public class LazyHttpConversationContextImpl extends HttpConversationContextImpl
HttpConversationContext that is capable of lazy initialization. By default, the context is associated with a request and the
active flag is set to true in the beginning of the request processing but the context is not initialized (cid not read and the state not restored) until the
conversation context is first accessed. As a result, BusyConversationException or NonexistentConversationException may be thrown late in the
request processing and any component invoking methods on ConversationScoped beans should be ready to catch these exceptions.
Lazy initialization is mostly a workaround for https://issues.jboss.org/browse/CDI-411.CONVERSATIONS_ATTRIBUTE_NAME| Constructor and Description |
|---|
LazyHttpConversationContextImpl(String contextId,
BeanIdentifierIndex beanIdentifierIndex) |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
void |
activate(java.util.function.Consumer<javax.servlet.http.HttpServletRequest> initializationCallback) |
protected void |
checkContextInitialized() |
void |
deactivate() |
boolean |
destroy(javax.servlet.http.HttpSession session) |
protected void |
initialize(String cid) |
boolean |
isInitialized() |
createRequestBeanStore, createSessionBeanStore, getNamingSchemePrefix, getRequestAttribute, getSessionAttribute, getSessionAttributeFromSession, getSessionFromRequest, removeRequestAttribute, setRequestAttribute, setSessionAttributeactivate, associate, associateRequest, associateRequestWithNewConversation, conversationPromotedToLongRunning, copyConversationIdGeneratorAndConversationsToSession, destroyConversation, dissociate, generateConversationId, getConcurrentAccessTimeout, getConversation, getConversations, getCurrentConversation, getDefaultTimeout, getParameterName, getRequest, getScope, invalidate, isAssociated, sessionCreated, setConcurrentAccessTimeout, setDefaultTimeout, setParameterNamecleanup, getBeanStore, setBeanStoreisActive, isValid, setActivedestroy, destroy, get, get, getContextual, getId, getServiceRegistryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitassociate, dissociateactivate, generateConversationId, getConcurrentAccessTimeout, getConversation, getConversations, getCurrentConversation, getDefaultTimeout, getParameterName, invalidate, setConcurrentAccessTimeout, setDefaultTimeout, setParameterNamepublic LazyHttpConversationContextImpl(String contextId, BeanIdentifierIndex beanIdentifierIndex)
public void activate(java.util.function.Consumer<javax.servlet.http.HttpServletRequest> initializationCallback)
initializationCallback - This callback will be executed during initializationpublic void activate()
activate in interface ConversationContextactivate in interface ManagedContextactivate in class AbstractConversationContext<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpSession>public boolean isInitialized()
protected void initialize(String cid)
initialize in class AbstractConversationContext<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpSession>public void deactivate()
deactivate in interface ManagedContextdeactivate in class AbstractConversationContext<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpSession>public boolean destroy(javax.servlet.http.HttpSession session)
destroy in interface org.jboss.weld.context.http.HttpConversationContextdestroy in class AbstractConversationContext<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpSession>protected void checkContextInitialized()
checkContextInitialized in class AbstractContextCopyright © 2015. All Rights Reserved.