ie.ncl.msg
Interface ReceiverListener
- All Known Implementing Classes:
- ConnectionManager, LongMessageReceiver, MMSReceiver, SyncReceiver
public interface ReceiverListener
This interface is used to receive messages asynchronously.
- See Also:
Receiver
Method Summary |
boolean |
received(Receiver receiver,
java.lang.Exception ex,
Message m)
This method will be called when a message is received. |
received
boolean received(Receiver receiver,
java.lang.Exception ex,
Message m)
- This method will be called when a message is received.
The application should return true to acknowledge the message.
Returning false (or throwing an runtime exception) will
result in the message being unacknowledged and therefore undelivered
as far as the underlying connection is concerned.
As such, the message may be redelivered at a later time.
If an error occurs receiving a message then the exception will
be non-null and the message may be incomplete or even null.
Callbacks are setup in implementations of the Receiver interface.
- Returns:
- true to indicate the message was received successfully, false otherwise
- See Also:
Receiver
,
Receiver.receive(ReceiverListener)