org.apache.axis.ime
Interface MessageExchange

All Superinterfaces:
FeatureEnabled
All Known Implementing Classes:
MessageExchangeImpl

public interface MessageExchange
extends FeatureEnabled

Represents the boundary interface through which messages are exchanged. This interface supports both push and pull models for receiving inbound messages.

Author:
James M Snell (jasnell@us.ibm.com), Ray Chun (rchun@sonicsoftware.com)

Method Summary
 void clearProperties()
           
 MessageExchangeEventListener getMessageExchangeEventListener()
           
 java.util.Map getProperties()
           
 java.lang.Object getProperty(java.lang.String propertyId)
           
 java.lang.Object getProperty(java.lang.String propertyId, java.lang.Object defaultValue)
           
 MessageContext receive()
          Waits indefinitely for a message to be received (blocking)
 MessageContext receive(long timeout)
          Waits the specified amount of time for a message to be received (blocking)
 MessageContext receive(MessageExchangeCorrelator correlator)
          Waits indefinitely for a message matching the specified correlator (blocking)
 MessageContext receive(MessageExchangeCorrelator correlator, long timeout)
          Waits the specified amount of time for a message matching the specified correlator (blocking)
 void receive(MessageExchangeCorrelator correlator, MessageExchangeEventListener listener)
          Registers a listener for receiving messages (nonblocking)
 void receive(MessageExchangeEventListener listener)
          Registers a listener for receiving messages (nonblocking)
 MessageExchangeCorrelator send(MessageContext context)
          Send an outbound message.
 MessageExchangeCorrelator send(MessageContext context, MessageExchangeEventListener listener)
          Send an outbound message.
 MessageContext sendAndReceive(MessageContext context)
          Synchronized send and receive
 MessageContext sendAndReceive(MessageContext context, long timeout)
          Synchronized send and receive with timeout
 void setMessageExchangeEventListener(MessageExchangeEventListener listener)
           
 void setProperties(java.util.Map properties)
           
 void setProperty(java.lang.String propertyId, java.lang.Object propertyValue)
           
 
Methods inherited from interface org.apache.axis.ime.FeatureEnabled
disableFeature, enableFeature, getSupportedFeatures, isFeatureEnabled
 

Method Detail

send

public MessageExchangeCorrelator send(MessageContext context)
                               throws AxisFault
Send an outbound message. (Impl's of this method need to create a new MessageExchangeCorrelator and put it into the MessageContext if one does not already exist.)
Parameters:
MessageContext - The Axis MessageContext being sent
Returns:
MessageExchangeCorrelator The correlator for the sent MessageContext
Throws:
AxisFault -  

send

public MessageExchangeCorrelator send(MessageContext context,
                                      MessageExchangeEventListener listener)
                               throws AxisFault
Send an outbound message. (Impl's of this method need to create a new MessageExchangeCorrelator and put it into the MessageContext if one does not already exist.)
Parameters:
MessageContext - The Axis MessageContext being sent
MessageContextListener - The listener to which responses, faults, and status updates should be delivered
Returns:
MessageExchangeCorrelator The correlator for the sent MessageContext
Throws:
AxisFault -  

receive

public MessageContext receive()
                       throws AxisFault
Waits indefinitely for a message to be received (blocking)
Returns:
MessageContext The received MessageContext
Throws:
AxisFault -  

receive

public MessageContext receive(long timeout)
                       throws AxisFault
Waits the specified amount of time for a message to be received (blocking)
Parameters:
long - The amount of time (ms) to wait
Returns:
MessageContext The received MessageContext
Throws:
AxisFault -  

receive

public MessageContext receive(MessageExchangeCorrelator correlator)
                       throws AxisFault
Waits indefinitely for a message matching the specified correlator (blocking)
Parameters:
MessageExchangeCorrelator -  
Returns:
MessageContext
Throws:
AxisFault -  

receive

public MessageContext receive(MessageExchangeCorrelator correlator,
                              long timeout)
                       throws AxisFault
Waits the specified amount of time for a message matching the specified correlator (blocking)
Parameters:
MessageExchangeCorrelator -  
long - timeout
Throws:
AxisFault -  

receive

public void receive(MessageExchangeEventListener listener)
             throws AxisFault
Registers a listener for receiving messages (nonblocking)
Parameters:
MessageContextListener -  
Throws:
AxisFault -  

receive

public void receive(MessageExchangeCorrelator correlator,
                    MessageExchangeEventListener listener)
             throws AxisFault
Registers a listener for receiving messages (nonblocking)
Parameters:
MessageExchangeCorrelator -  
MessageContextListener -  
Throws:
AxisFault -  

sendAndReceive

public MessageContext sendAndReceive(MessageContext context)
                              throws AxisFault
Synchronized send and receive
Parameters:
MessageContext - The MessageContext to send
Returns:
MessageContext The received MessageContext (not guaranteed to be the same object instance as the sent MessageContext)
Throws:
AxisFault -  

sendAndReceive

public MessageContext sendAndReceive(MessageContext context,
                                     long timeout)
                              throws AxisFault
Synchronized send and receive with timeout
Parameters:
MessageContext - The MessageContext to send
long - The length of time (ms) to wait for a response. If a response is not received within the specified amount of time, an AxisFault indicating timeout must be thrown
Returns:
MessageContext The received MessageContext (not guaranteed to be the same object instance as the sent MessageContext)
Throws:
AxisFault -  

setMessageExchangeEventListener

public void setMessageExchangeEventListener(MessageExchangeEventListener listener)

getMessageExchangeEventListener

public MessageExchangeEventListener getMessageExchangeEventListener()

setProperty

public void setProperty(java.lang.String propertyId,
                        java.lang.Object propertyValue)
Parameters:
String - The id of the property
Object - The value of the property

getProperty

public java.lang.Object getProperty(java.lang.String propertyId)
Parameters:
String - The id of the property
Returns:
Object The value of the property

getProperty

public java.lang.Object getProperty(java.lang.String propertyId,
                                    java.lang.Object defaultValue)
Parameters:
String - The id of the property
Object - The default value of the property
Returns:
Object The value of the property

getProperties

public java.util.Map getProperties()
Returns:
java.lang.Map The collection of properties

setProperties

public void setProperties(java.util.Map properties)
Parameters:
java.lang.Map - The collection of properties

clearProperties

public void clearProperties()


Copyright © 2002 Apache XML Project. All Rights Reserved.