|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.weld.context.AbstractContext
org.jboss.weld.context.AbstractManagedContext
org.jboss.weld.context.AbstractBoundContext<R>
org.jboss.weld.context.AbstractConversationContext<R,S>
public abstract class AbstractConversationContext<R,S>
The base of the conversation context, which can use a variety of storage forms
Field Summary | |
---|---|
static String |
CONVERSATIONS_ATTRIBUTE_NAME
|
Constructor Summary | |
---|---|
AbstractConversationContext()
|
Method Summary | |
---|---|
void |
activate()
|
void |
activate(String cid)
|
boolean |
associate(R request)
|
protected void |
associateRequest()
|
protected void |
associateRequest(String cid)
|
protected abstract BoundBeanStore |
createRequestBeanStore(NamingScheme namingScheme,
R request)
|
protected abstract BoundBeanStore |
createSessionBeanStore(NamingScheme namingScheme,
S session)
|
void |
deactivate()
|
boolean |
destroy(S session)
|
protected void |
destroyConversation(S session,
String id)
|
boolean |
dissociate(R request)
|
String |
generateConversationId()
|
long |
getConcurrentAccessTimeout()
|
org.jboss.weld.context.ManagedConversation |
getConversation(String id)
|
Collection<org.jboss.weld.context.ManagedConversation> |
getConversations()
|
org.jboss.weld.context.ManagedConversation |
getCurrentConversation()
|
long |
getDefaultTimeout()
|
String |
getParameterName()
|
protected abstract Object |
getRequestAttribute(R request,
String name)
Retrieve an attribute value from the request |
Class<? extends Annotation> |
getScope()
|
protected abstract Object |
getSessionAttribute(R request,
String name,
boolean create)
Get an attribute value from the session. |
protected abstract Object |
getSessionAttributeFromSession(S session,
String name)
Get an attribute value from the session. |
protected abstract S |
getSessionFromRequest(R request,
boolean create)
|
void |
invalidate()
|
protected abstract void |
removeRequestAttribute(R request,
String name)
Remove an attribute from the request. |
void |
setConcurrentAccessTimeout(long timeout)
|
void |
setDefaultTimeout(long timeout)
|
void |
setParameterName(String cid)
|
protected abstract void |
setRequestAttribute(R request,
String name,
Object value)
Set an attribute in the request. |
protected abstract void |
setSessionAttribute(R request,
String name,
Object value,
boolean create)
Set an attribute in the session. |
Methods inherited from class org.jboss.weld.context.AbstractBoundContext |
---|
cleanup, getBeanStore, setBeanStore |
Methods inherited from class org.jboss.weld.context.AbstractManagedContext |
---|
isActive, setActive |
Methods inherited from class org.jboss.weld.context.AbstractContext |
---|
destroy, get, get, getContextual, getId, getServiceRegistry |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.enterprise.context.spi.Context |
---|
get, get, isActive |
Field Detail |
---|
public static final String CONVERSATIONS_ATTRIBUTE_NAME
Constructor Detail |
---|
public AbstractConversationContext()
Method Detail |
---|
public String getParameterName()
getParameterName
in interface org.jboss.weld.context.ConversationContext
public void setParameterName(String cid)
setParameterName
in interface org.jboss.weld.context.ConversationContext
public void setConcurrentAccessTimeout(long timeout)
setConcurrentAccessTimeout
in interface org.jboss.weld.context.ConversationContext
public long getConcurrentAccessTimeout()
getConcurrentAccessTimeout
in interface org.jboss.weld.context.ConversationContext
public void setDefaultTimeout(long timeout)
setDefaultTimeout
in interface org.jboss.weld.context.ConversationContext
public long getDefaultTimeout()
getDefaultTimeout
in interface org.jboss.weld.context.ConversationContext
public boolean associate(R request)
associate
in interface org.jboss.weld.context.BoundContext<R>
public boolean dissociate(R request)
dissociate
in interface org.jboss.weld.context.BoundContext<R>
public void activate()
activate
in interface org.jboss.weld.context.ConversationContext
activate
in interface org.jboss.weld.context.ManagedContext
activate
in class AbstractBoundContext<R>
protected void associateRequest()
protected void associateRequest(String cid)
public void activate(String cid)
activate
in interface org.jboss.weld.context.ConversationContext
public void deactivate()
deactivate
in interface org.jboss.weld.context.ManagedContext
deactivate
in class AbstractBoundContext<R>
public void invalidate()
invalidate
in interface org.jboss.weld.context.ConversationContext
invalidate
in interface org.jboss.weld.context.ManagedContext
invalidate
in class AbstractManagedContext
public boolean destroy(S session)
protected void destroyConversation(S session, String id)
public String generateConversationId()
generateConversationId
in interface org.jboss.weld.context.ConversationContext
public org.jboss.weld.context.ManagedConversation getConversation(String id)
getConversation
in interface org.jboss.weld.context.ConversationContext
public Collection<org.jboss.weld.context.ManagedConversation> getConversations()
getConversations
in interface org.jboss.weld.context.ConversationContext
public org.jboss.weld.context.ManagedConversation getCurrentConversation()
getCurrentConversation
in interface org.jboss.weld.context.ConversationContext
public Class<? extends Annotation> getScope()
getScope
in interface javax.enterprise.context.spi.Context
protected abstract void setSessionAttribute(R request, String name, Object value, boolean create)
request
- the request to set the session attribute inname
- the name of the attributevalue
- the value of the attributecreate
- if false, the attribute will only be set if the session
already exists, other wise it will always be set
IllegalStateException
- if create is true, and the session can't be
createdprotected abstract Object getSessionAttribute(R request, String name, boolean create)
request
- the request to get the session attribute fromname
- the name of the attributecreate
- if false, the attribute will only be retrieved if the
session already exists, other wise it will always be retrieved
IllegalStateException
- if create is true, and the session can't be
createdprotected abstract Object getSessionAttributeFromSession(S session, String name)
session
- the session to get the session attribute fromname
- the name of the attribute
IllegalStateException
- if create is true, and the session can't be
createdprotected abstract void removeRequestAttribute(R request, String name)
request
- the request to remove the attribute fromname
- the name of the attributeprotected abstract void setRequestAttribute(R request, String name, Object value)
request
- the request to set the attribute fromname
- the name of the attributevalue
- the value of the attributeprotected abstract Object getRequestAttribute(R request, String name)
request
- the request to get the attribute fromname
- the name of the attribute to get
protected abstract BoundBeanStore createRequestBeanStore(NamingScheme namingScheme, R request)
protected abstract BoundBeanStore createSessionBeanStore(NamingScheme namingScheme, S session)
protected abstract S getSessionFromRequest(R request, boolean create)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |