public class ConversationImpl extends Object implements ManagedConversation, Serializable
| Constructor and Description |
|---|
ConversationImpl(BeanManagerImpl manager) |
| Modifier and Type | Method and Description |
|---|---|
void |
begin()
Mark the current transient conversation long-running.
|
void |
begin(String id)
Mark the current transient conversation long-running, with a specified identifier.
|
void |
end()
Marks the current long-running conversation transient.
|
String |
getId()
Get the identifier of the current long-running conversation.
|
long |
getLastUsed()
Gets the last time the conversation was used (for data access)
|
long |
getTimeout()
Get the timeout of the current conversation.
|
boolean |
isContextActive() |
boolean |
isTransient()
Determine if the conversation is marked transient or long-running.
|
boolean |
lock(long timeout)
Attempts to lock the conversation for exclusive usage
|
void |
setTimeout(long timeout)
Set the timeout of the current conversation.
|
String |
toString() |
void |
touch()
Touches the managed conversation, updating the "last used" timestamp
|
boolean |
unlock()
Attempts to unlock the conversation
|
@Inject public ConversationImpl(BeanManagerImpl manager)
public void begin()
ConversationMark the current transient conversation long-running. A conversation identifier is generated by the container.
begin in interface Conversationpublic void begin(String id)
ConversationMark the current transient conversation long-running, with a specified identifier.
begin in interface Conversationpublic void end()
ConversationMarks the current long-running conversation transient.
end in interface Conversationpublic String getId()
ConversationGet the identifier of the current long-running conversation.
getId in interface Conversationpublic long getTimeout()
ConversationGet the timeout of the current conversation.
getTimeout in interface Conversationpublic void setTimeout(long timeout)
ConversationSet the timeout of the current conversation.
setTimeout in interface Conversationtimeout - the new timeout in milliseconds.public boolean isTransient()
ConversationDetermine if the conversation is marked transient or long-running.
isTransient in interface Conversationpublic long getLastUsed()
ManagedConversationgetLastUsed in interface ManagedConversationpublic void touch()
ManagedConversationtouch in interface ManagedConversationpublic boolean lock(long timeout)
ManagedConversationlock in interface ManagedConversationtimeout - The time in milliseconds to wait on the lockpublic boolean unlock()
ManagedConversationunlock in interface ManagedConversationpublic boolean isContextActive()
Copyright © 2014. All Rights Reserved.