|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Conversation
Allows the application to manage the conversation context by marking the current conversation as transient or long-running, specifying a conversation identifier, or setting the conversation timeout.
An instance may be injected:
@Inject Conversation conversation;
The conversation timeout is a hint to the container that a conversation should not be destroyed if it has been active within the last given interval in milliseconds.
@ConversationScoped
Method Summary | |
---|---|
void |
begin()
Mark the current transient conversation long-running. |
void |
begin(java.lang.String id)
Mark the current transient conversation long-running, with a specified identifier. |
void |
end()
Marks the current long-running conversation transient. |
java.lang.String |
getId()
Get the identifier of the current long-running conversation. |
long |
getTimeout()
Get the timeout of the current conversation. |
boolean |
isTransient()
Determine if the conversation is marked transient or long-running. |
void |
setTimeout(long milliseconds)
Set the timeout of the current conversation. |
Method Detail |
---|
void begin()
Mark the current transient conversation long-running. A conversation identifier is generated by the container.
IllegalStateException
- if the current conversation
is already marked long-running.void begin(java.lang.String id)
Mark the current transient conversation long-running, with a specified identifier.
IllegalStateException
- if the current conversation
is already marked long-running.
IllegalArgumentException
- if a conversation with
the specified identifier already exists.void end()
Marks the current long-running conversation transient.
IllegalStateException
- if the current conversation
is already marked transient.java.lang.String getId()
Get the identifier of the current long-running conversation.
long getTimeout()
Get the timeout of the current conversation.
void setTimeout(long milliseconds)
Set the timeout of the current conversation.
milliseconds
- the new timeout in milliseconds.boolean isTransient()
Determine if the conversation is marked transient or long-running.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.
Generated on 10-February-2011 12:41