com.atomikos.icatch.msg
Class ReceiveListener

java.lang.Object
  extended by com.atomikos.icatch.msg.ReceiveListener
All Implemented Interfaces:
MessageListener

public class ReceiveListener
extends Object
implements MessageListener

A listener implementation for synchronous receives.


Constructor Summary
ReceiveListener(Transport t, String target, long timeout)
          Create a new one.
 
Method Summary
 TransactionMessage getMessage()
          Get the reply.
 boolean messageReceived(TransactionMessage msg, Transport t)
          The callback method, called by the transport when a message is received for this listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReceiveListener

public ReceiveListener(Transport t,
                       String target,
                       long timeout)
Create a new one.

Parameters:
target - The target URI that the incoming message must match.
timeout - The timeout in millis.
Method Detail

messageReceived

public boolean messageReceived(TransactionMessage msg,
                               Transport t)
Description copied from interface: MessageListener
The callback method, called by the transport when a message is received for this listener.

Specified by:
messageReceived in interface MessageListener
Parameters:
msg - The message that was received.
Returns:
boolean False if the listener wants no more messages (and can be removed).
See Also:
MessageListener

getMessage

public TransactionMessage getMessage()
Get the reply. This method will block for the timeout if none is available.



Copyright © 2012. All Rights Reserved.