|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ConversationManager
A service for managing conversations. This interface is the entry point into the conversation subsystem.
| Method Summary | |
|---|---|
Conversation |
beginConversation(ConversationParameters conversationParameters)
Begin a new conversation. |
Conversation |
getConversation(ConversationId id)
Get the conversation with the provided id. |
ConversationId |
parseConversationId(java.lang.String encodedId)
Parse the string-encoded conversationId into its object form. |
| Method Detail |
|---|
Conversation beginConversation(ConversationParameters conversationParameters)
throws ConversationException
conversationParameters - descriptive conversation parameters
ConversationException - an exception occured
Conversation getConversation(ConversationId id)
throws ConversationException
Implementors should take care to manage conversation identity correctly. Although it is not strictly required to return the same (==) Conversation object every time this method is called with a particular conversation id in a single execution thread, callers will expect to recieve an object that allows them to manipulate the identified conversation. In other words, the following is legal ConversationManager client code:
ConversationManager manager = ...;
ConversationId id = ...;
Conversation conv = manager.getConversation(id);
conv.lock();
try {
Conversation localReference = manager.getConversation(id);
// no need to lock since conversation 'id' is already locked
// even though possibly conv != localReference
localReference.putAttribute("foo", "bar");
Object foo = conv.getAttribute("foo");
}
finally {
conv.unlock();
}
id - the conversation id
NoSuchConversationException - the id provided was invalid
ConversationException
ConversationId parseConversationId(java.lang.String encodedId)
throws ConversationException
ConversationId.toString().
encodedId - the encoded id
ConversationException - an exception occured parsing the id
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||