Package org.jboss.weld.contexts
Class AbstractManagedContext
java.lang.Object
org.jboss.weld.contexts.AbstractContext
org.jboss.weld.contexts.AbstractManagedContext
- All Implemented Interfaces:
jakarta.enterprise.context.spi.AlterableContext,jakarta.enterprise.context.spi.Context,ManagedContext,WeldAlterableContext
- Direct Known Subclasses:
AbstractBoundContext,AbstractUnboundContext
- Author:
- Pete Muir
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()Activate the Context.voidDeactivate the Context, destroying any instances if the context is invalid.voidMark the context as due for destruction when deactivate is called.booleanisActive()booleanisValid()protected voidThe managed state should be always removed during deactivation.protected voidsetActive(boolean active) Methods inherited from class org.jboss.weld.contexts.AbstractContext
checkContextInitialized, cleanup, destroy, destroy, get, get, getBeanStore, getContextual, getId, getServiceRegistry, isMultithreadedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.enterprise.context.spi.AlterableContext
destroyMethods inherited from interface jakarta.enterprise.context.spi.Context
get, get, getScopeMethods inherited from interface org.jboss.weld.context.WeldAlterableContext
clearAndSet, getAllContextualInstances
-
Constructor Details
-
AbstractManagedContext
-
-
Method Details
-
isActive
public boolean isActive()- Specified by:
isActivein interfacejakarta.enterprise.context.spi.Context
-
setActive
protected void setActive(boolean active) -
invalidate
public void invalidate()Description copied from interface:ManagedContextMark the context as due for destruction when deactivate is called.- Specified by:
invalidatein interfaceManagedContext
-
activate
public void activate()Description copied from interface:ManagedContextActivate the Context.- Specified by:
activatein interfaceManagedContext
-
isValid
public boolean isValid() -
deactivate
public void deactivate()Description copied from interface:ManagedContextDeactivate the Context, destroying any instances if the context is invalid.- Specified by:
deactivatein interfaceManagedContext
-
removeState
protected void removeState()The managed state should be always removed during deactivation. Note that there are some special cases where the context is not deactivated throughdeactivate()method. E.g.AbstractConversationContext.destroy(Object).
-