Package org.jboss.weld.contexts
Class AbstractManagedContext
- java.lang.Object
-
- org.jboss.weld.contexts.AbstractContext
-
- org.jboss.weld.contexts.AbstractManagedContext
-
- All Implemented Interfaces:
AlterableContext,Context,ManagedContext,WeldAlterableContext
- Direct Known Subclasses:
AbstractBoundContext,AbstractUnboundContext
public abstract class AbstractManagedContext extends AbstractContext implements ManagedContext
- Author:
- Pete Muir
-
-
Constructor Summary
Constructors Constructor Description AbstractManagedContext(String contextId, boolean multithreaded)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate()Activate the Context.voiddeactivate()Deactivate the Context, destroying any instances if the context is invalid.voidinvalidate()Mark the context as due for destruction when deactivate is called.booleanisActive()Determines if the context object is active.booleanisValid()protected voidremoveState()The 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, isMultithreaded
-
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.AlterableContext
destroy
-
Methods inherited from interface org.jboss.weld.context.WeldAlterableContext
clearAndSet, getAllContextualInstances
-
-
-
-
Constructor Detail
-
AbstractManagedContext
public AbstractManagedContext(String contextId, boolean multithreaded)
-
-
Method Detail
-
isActive
public boolean isActive()
Description copied from interface:ContextDetermines if the context object is active.
-
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).
-
-