org.jboss.weld.conversation
Class ConversationImpl

java.lang.Object
  extended by org.jboss.weld.conversation.ConversationImpl
All Implemented Interfaces:
java.io.Serializable, javax.enterprise.context.Conversation

@RequestScoped
@Named(value="javax.enterprise.context.conversation")
@Default
public class ConversationImpl
extends java.lang.Object
implements javax.enterprise.context.Conversation, java.io.Serializable

The current conversation implementation

Author:
Nicklas Karlsson
See Also:
Conversation, Serialized Form

Constructor Summary
ConversationImpl()
          Creates a new conversation
ConversationImpl(ConversationImpl conversation)
          Creates a new conversation from an existing one.
 
Method Summary
 void begin()
           
 void begin(java.lang.String id)
           
 void end()
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getId()
           
 java.lang.String getOriginalId()
          Gets the original ID of the conversation
 long getTimeout()
           
 java.lang.String getUnderlyingId()
          Get the Conversation Id, regardless of whether the conversation is long running or transient, needed for internal operations
 int hashCode()
           
 void init(org.jboss.weld.conversation.ConversationIdGenerator conversationIdGenerator, long timeout)
          Initializes a new conversation
 boolean isLongRunning()
           
 boolean isTransient()
           
 void setLongRunning(boolean longRunning)
           
 void setTimeout(long timeout)
           
 void switchTo(ConversationImpl conversation)
          Assumes the identity of another conversation
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConversationImpl

public ConversationImpl()
Creates a new conversation


ConversationImpl

public ConversationImpl(ConversationImpl conversation)
Creates a new conversation from an existing one.

Parameters:
conversation - The old conversation
Method Detail

init

@Inject
public void init(org.jboss.weld.conversation.ConversationIdGenerator conversationIdGenerator,
                        @ConversationInactivityTimeout
                        long timeout)
Initializes a new conversation

Parameters:
conversationIdGenerator - The conversation ID generator
timeout - The conversation inactivity timeout

begin

public void begin()
Specified by:
begin in interface javax.enterprise.context.Conversation

begin

public void begin(java.lang.String id)
Specified by:
begin in interface javax.enterprise.context.Conversation

end

public void end()
Specified by:
end in interface javax.enterprise.context.Conversation

getId

public java.lang.String getId()
Specified by:
getId in interface javax.enterprise.context.Conversation

getUnderlyingId

public java.lang.String getUnderlyingId()
Get the Conversation Id, regardless of whether the conversation is long running or transient, needed for internal operations

Returns:
the id

getTimeout

public long getTimeout()
Specified by:
getTimeout in interface javax.enterprise.context.Conversation

isLongRunning

public boolean isLongRunning()
Specified by:
isLongRunning in interface javax.enterprise.context.Conversation

setTimeout

public void setTimeout(long timeout)
Specified by:
setTimeout in interface javax.enterprise.context.Conversation

switchTo

public void switchTo(ConversationImpl conversation)
Assumes the identity of another conversation

Parameters:
conversation - The new conversation

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setLongRunning

public void setLongRunning(boolean longRunning)

getOriginalId

public java.lang.String getOriginalId()
Gets the original ID of the conversation

Returns:
The id

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

isTransient

public boolean isTransient()
Specified by:
isTransient in interface javax.enterprise.context.Conversation


Copyright © 2008-2009 Seam Framework. All Rights Reserved.