public class MessageStore
extends java.lang.Object
Constructor and Description |
---|
MessageStore()
Create a new instance of MessageStore.
|
Modifier and Type | Method and Description |
---|---|
void |
addCommID(java.lang.String commID,
MessageInfo messageInfo)
Add a communication id with its related client reference.
|
void |
addMethodTransit(java.lang.String replyID)
Add a reply id to indicate that it has been registered, but not necessarily
completed execution yet.
|
void |
addSavedReply(java.lang.String replyID,
java.lang.Object reply)
Add a reply id with its related method reply.
|
MessageInfo |
getCommClient(java.lang.String commID)
Get the client message info for the communication id.
|
java.util.ArrayList<java.lang.String> |
getCommIDs()
Get the list of current communication IDs.
|
java.util.ArrayList<java.lang.String> |
getReplyIDs()
Get the list of current reply IDs.
|
MessageInfo |
getSavedReply(java.lang.String replyID)
Get and remove the reply object for the reply id.
|
boolean |
hasCommID(java.lang.String commID)
Return true if the communication ID is saved.
|
boolean |
hasSavedReply(java.lang.String replyID)
Return true if the method reply is saved.
|
boolean |
inTransit(java.lang.String replyID)
Return true if the method reply has been registered and/or may have completed.
|
void |
removeCommID(java.lang.String commID)
Remove the communication ID from the stored list.
|
void |
removeReplyID(java.lang.String replyID)
Remove the reply ID from the registered and stored lists, plus any stored object.
|
public boolean hasCommID(java.lang.String commID)
commID
- the id to check for.public boolean inTransit(java.lang.String replyID)
replyID
- the id to check for.public boolean hasSavedReply(java.lang.String replyID)
replyID
- the id to check for.public java.util.ArrayList<java.lang.String> getCommIDs()
public java.util.ArrayList<java.lang.String> getReplyIDs()
public void addCommID(java.lang.String commID, MessageInfo messageInfo)
commID
- a unique comm id for the client.messageInfo
- the client reference - URI or other. Can also be timestamped.public void removeCommID(java.lang.String commID)
commID
- the id to remove.public MessageInfo getCommClient(java.lang.String commID)
commID
- the id to check for.public void addSavedReply(java.lang.String replyID, java.lang.Object reply)
replyID
- a unique reply id for the client.reply
- the reply object to store.public void addMethodTransit(java.lang.String replyID)
replyID
- a unique reply id for the client.public void removeReplyID(java.lang.String replyID)
replyID
- the id to remove.public MessageInfo getSavedReply(java.lang.String replyID)
replyID
- the id to check for.