public class ConversationImpl extends Object implements ManagedConversation, Serializable
Constructor and Description |
---|
ConversationImpl(Instance<ConversationContext> conversationContexts) |
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 |
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(Instance<ConversationContext> conversationContexts)
public void begin()
Conversation
Mark the current transient conversation long-running. A conversation identifier is generated by the container.
begin
in interface Conversation
public void begin(String id)
Conversation
Mark the current transient conversation long-running, with a specified identifier.
begin
in interface Conversation
public void end()
Conversation
Marks the current long-running conversation transient.
end
in interface Conversation
public String getId()
Conversation
Get the identifier of the current long-running conversation.
getId
in interface Conversation
public long getTimeout()
Conversation
Get the timeout of the current conversation.
getTimeout
in interface Conversation
public void setTimeout(long timeout)
Conversation
Set the timeout of the current conversation.
setTimeout
in interface Conversation
timeout
- the new timeout in milliseconds.public boolean isTransient()
Conversation
Determine if the conversation is marked transient or long-running.
isTransient
in interface Conversation
public long getLastUsed()
ManagedConversation
getLastUsed
in interface ManagedConversation
public void touch()
ManagedConversation
touch
in interface ManagedConversation
public boolean lock(long timeout)
ManagedConversation
lock
in interface ManagedConversation
timeout
- The time in milliseconds to wait on the lockpublic boolean unlock()
ManagedConversation
unlock
in interface ManagedConversation
Copyright © 2013 Seam Framework. All Rights Reserved.