ie.ncl.msg
Interface Receiver
- All Superinterfaces:
- Connection
- All Known Implementing Classes:
- CimdConnection, ConnectionManager, GsmModem, LongMessageReceiver, Loopback, SmppConnection, UCPConnection
public interface Receiver
- extends Connection
An Receiver is a connection to some service that is used
to deliver messages to the application.
See above for implementations of the Receiver object.
See the Factory class for ways of instantiaing receivers
dynamically at runtime.
- See Also:
Factory
receive
void receive(ReceiverListener listener)
throws ConnectionException
- Deprecated. Use
setReceiverListener(ReceiverListener)
instead
- Receive messages asynchronously.
The underlying transport should not receive messages
until this is setup. Also, the underlying transport
should not acknowledge messages until the
ReceiverListener returns true or acknowledge is called.
- Throws:
ConnectionException
- See Also:
Message
setReceiverListener
void setReceiverListener(ReceiverListener listener)
throws ConnectionException
- Registers listener with the underlying transport.
The underlying transport should not receive messages
until this is setup. Also, the underlying transport
should not acknowledge messages until the
ReceiverListener returns true or acknowledge is called.
- Throws:
ConnectionException
- See Also:
Message
acknowledge
void acknowledge(Message message,
boolean success)
throws MessageException,
ConnectionException
- Acknowledge a received messages.
Messages that already have been acknowledged or
that require no acknowledgement should be
ignored. By default a (receiver) connection
will acknowledge messages automatically
unless otherwise specified so calls to
acknowledge may be unnecessary.
- Throws:
MessageException
ConnectionException