org.jboss.seam.contexts
Class ServerConversationContext

java.lang.Object
  extended by org.jboss.seam.contexts.ServerConversationContext
All Implemented Interfaces:
Context

public class ServerConversationContext
extends Object
implements Context

A conversation context is a logical context that lasts longer than a request but shorter than a login session. Conversation state may be passivated or replicated.

Author:
Gavin King, Thomas Heute

Constructor Summary
ServerConversationContext(Map<String,Object> session)
           
ServerConversationContext(Map<String,Object> session, String id)
           
 
Method Summary
 void clear()
           
 void flush()
          Propagate additions and removals to the HttpSession if the current conversation is long-running, or remove all attributes if it is a temporary conversation.
 Object get(Class clazz)
          Get a component instance, by its component name, as determined by the @Name annotation value.
 Object get(String name)
          Get a value by name.
 String[] getNames()
          Get all names defined in the context.
 ScopeType getType()
          Get the scope that this context object is associated with,
 boolean isSet(String name)
          Is the value set?
 void remove(String name)
          Unset a value.
 void set(String name, Object value)
          Set a value.
 String toString()
           
 void unflush()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerConversationContext

public ServerConversationContext(Map<String,Object> session)

ServerConversationContext

public ServerConversationContext(Map<String,Object> session,
                                 String id)
Method Detail

getType

public ScopeType getType()
Description copied from interface: Context
Get the scope that this context object is associated with,

Specified by:
getType in interface Context

get

public Object get(String name)
Description copied from interface: Context
Get a value by name.

Specified by:
get in interface Context

set

public void set(String name,
                Object value)
Description copied from interface: Context
Set a value.

Specified by:
set in interface Context

isSet

public boolean isSet(String name)
Description copied from interface: Context
Is the value set?

Specified by:
isSet in interface Context

remove

public void remove(String name)
Description copied from interface: Context
Unset a value.

Specified by:
remove in interface Context

getNames

public String[] getNames()
Description copied from interface: Context
Get all names defined in the context.

Specified by:
getNames in interface Context

get

public Object get(Class clazz)
Description copied from interface: Context
Get a component instance, by its component name, as determined by the @Name annotation value.

Specified by:
get in interface Context

clear

public void clear()

unflush

public void unflush()

flush

public void flush()
Propagate additions and removals to the HttpSession if the current conversation is long-running, or remove all attributes if it is a temporary conversation. This work may only be done at the end of the request, since we don't know for sure the conversation id until then.

Specified by:
flush in interface Context

toString

public String toString()
Overrides:
toString in class Object