org.apache.webbeans.conversation
Class ConversationImpl

java.lang.Object
  extended by org.apache.webbeans.conversation.ConversationImpl
All Implemented Interfaces:
Serializable, javax.enterprise.context.Conversation

public class ConversationImpl
extends Object
implements javax.enterprise.context.Conversation, Serializable

Implementation of the Conversation interface.

Version:
$Rev$ $Date$
See Also:
Serialized Form

Constructor Summary
ConversationImpl()
          Default constructor.
ConversationImpl(String sessionId, WebBeansContext webBeansContext)
          Creates a new conversation instance.
ConversationImpl(WebBeansContext webBeansContext)
           
 
Method Summary
 void begin()
          
 void begin(String id)
          
 void end()
          
 boolean equals(Object obj)
           
 long getActiveTime()
           
 String getId()
          
 AtomicBoolean getInUsed()
           
 String getSessionId()
          Gets session id.
 long getTimeout()
          
 int hashCode()
           
 boolean isTransient()
          
 void setInUsed(boolean inUsed)
           
 void setTimeout(long milliseconds)
          
 void setTransient(boolean value)
          Sets transient.
 String toString()
           
 void updateTimeOut()
          Update conversation timeout value.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConversationImpl

public ConversationImpl()
Default constructor. Used in tests.


ConversationImpl

public ConversationImpl(WebBeansContext webBeansContext)

ConversationImpl

public ConversationImpl(String sessionId,
                        WebBeansContext webBeansContext)
Creates a new conversation instance. Id is not set until conversation is begin.

Parameters:
sessionId -
webBeansContext -
Method Detail

begin

public void begin()

Specified by:
begin in interface javax.enterprise.context.Conversation

begin

public void begin(String id)

Specified by:
begin in interface javax.enterprise.context.Conversation

end

public void end()

Specified by:
end in interface javax.enterprise.context.Conversation

getInUsed

public AtomicBoolean getInUsed()
Returns:
the inUsed

setInUsed

public void setInUsed(boolean inUsed)
Parameters:
inUsed - the inUsed to set

setTransient

public void setTransient(boolean value)
Sets transient.

Parameters:
value - transient value

getId

public String getId()

Specified by:
getId in interface javax.enterprise.context.Conversation

getTimeout

public long getTimeout()

Specified by:
getTimeout in interface javax.enterprise.context.Conversation

isTransient

public boolean isTransient()

Specified by:
isTransient in interface javax.enterprise.context.Conversation

setTimeout

public void setTimeout(long milliseconds)

Specified by:
setTimeout in interface javax.enterprise.context.Conversation

getSessionId

public String getSessionId()
Gets session id.

Returns:
conversation session id

getActiveTime

public long getActiveTime()
Returns:
the creationTime

updateTimeOut

public void updateTimeOut()
Update conversation timeout value.


hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.