ie.ncl.msg
Interface MessageStore
- All Superinterfaces:
- Connection
public interface MessageStore
- extends Connection
This Interface defines the methods used to
interface with a message store - such as a database, message server
or message centre, JMS or some other underlying persistent system.
Implementation of these methods are optional in Sender and Receiver
implementations.
Method Summary |
void |
cancel(java.lang.String id)
Cancel a message as specified by the ID. |
Message |
query(java.lang.String id)
Query the message given the message id. |
void |
replace(java.lang.String id,
Message newOne)
Replace a message as specified by the ID with a newOne. |
int |
status(java.lang.String id)
Query the state of a message given the message id. |
STATE_ENROUTE
static final int STATE_ENROUTE
- See Also:
- Constant Field Values
STATE_DELIVERED
static final int STATE_DELIVERED
- See Also:
- Constant Field Values
STATE_ERROR
static final int STATE_ERROR
- See Also:
- Constant Field Values
replace
void replace(java.lang.String id,
Message newOne)
throws MessageException,
ConnectionException
- Replace a message as specified by the ID with a newOne.
The message ID is that returned from Message.getID() of a sent message.
If the message is delivered, a new one is generated.
- Throws:
MessageException
ConnectionException
- See Also:
Message.getID()
,
Message
cancel
void cancel(java.lang.String id)
throws MessageException,
ConnectionException
- Cancel a message as specified by the ID.
The message ID is that returned from Message.getID() of a sent message.
If the message is not
in a final state (DELIVERED/ERROR) the message delivery
will be aborted, otherwise a MessageException will be thrown.
- Throws:
MessageException
ConnectionException
- See Also:
Message.getID()
,
Message
query
Message query(java.lang.String id)
throws MessageException,
ConnectionException
- Query the message given the message id.
The message ID is that returned from Message.getID() of a sent message.
- Throws:
MessageException
ConnectionException
- See Also:
Message.getID()
,
Message
status
int status(java.lang.String id)
throws MessageException,
ConnectionException
- Query the state of a message given the message id.
The message ID is that returned from Message.getID() of a sent message.
- Throws:
MessageException
ConnectionException
- See Also:
Message.getID()
,
Message