Package org.jboss.weld.contexts.unbound
Class RequestContextImpl
- java.lang.Object
-
- org.jboss.weld.contexts.AbstractContext
-
- org.jboss.weld.contexts.AbstractManagedContext
-
- org.jboss.weld.contexts.AbstractUnboundContext
-
- org.jboss.weld.contexts.unbound.RequestContextImpl
-
- All Implemented Interfaces:
AlterableContext,Context,ManagedContext,RequestContext,WeldAlterableContext
public class RequestContextImpl extends AbstractUnboundContext implements RequestContext
-
-
Constructor Summary
Constructors Constructor Description RequestContextImpl(String contextId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate()Activate the Context.voidclearAndSet(Collection<ContextualInstance<?>> setOfInstances)Clears the backing bean store and feeds it with the set ofContextualInstanceprovided as parameter.voiddeactivate()Deactivate the Context, destroying any instances if the context is invalid.Collection<ContextualInstance<?>>getAllContextualInstances()Retrieves set ofContextualInstancewithin the context.Class<? extends Annotation>getScope()Get the scope type of the context object.-
Methods inherited from class org.jboss.weld.contexts.AbstractUnboundContext
cleanup, destroy, getBeanStore, setBeanStore
-
Methods inherited from class org.jboss.weld.contexts.AbstractManagedContext
invalidate, isActive, isValid, removeState, setActive
-
Methods inherited from class org.jboss.weld.contexts.AbstractContext
checkContextInitialized, destroy, get, get, 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.ManagedContext
invalidate
-
-
-
-
Constructor Detail
-
RequestContextImpl
public RequestContextImpl(String contextId)
-
-
Method Detail
-
getScope
public Class<? extends Annotation> getScope()
Description copied from interface:ContextGet the scope type of the context object.
-
activate
public void activate()
Description copied from interface:ManagedContextActivate the Context.- Specified by:
activatein interfaceManagedContext- Overrides:
activatein classAbstractManagedContext
-
deactivate
public void deactivate()
Description copied from interface:ManagedContextDeactivate the Context, destroying any instances if the context is invalid.- Specified by:
deactivatein interfaceManagedContext- Overrides:
deactivatein classAbstractManagedContext
-
getAllContextualInstances
public Collection<ContextualInstance<?>> getAllContextualInstances()
Description copied from interface:WeldAlterableContextRetrieves set ofContextualInstancewithin the context. This entails all instances that were created up to this point - Weld creates them lazily so unless some beans were already used, they have not been stored.- Specified by:
getAllContextualInstancesin interfaceWeldAlterableContext- Returns:
- Set of all
ContextualInstanceexisting in this context
-
clearAndSet
public void clearAndSet(Collection<ContextualInstance<?>> setOfInstances)
Description copied from interface:WeldAlterableContextClears the backing bean store and feeds it with the set ofContextualInstanceprovided as parameter. AllContextualInstancehave to belong to the same scope as does thisWeldAlterableContextotherwiseIllegalArgumentExceptionis thrown.- Specified by:
clearAndSetin interfaceWeldAlterableContext- Parameters:
setOfInstances- set ofContextualInstancewhich are to become the new bean store for this context
-
-