public interface ContextsService
For example, web container supports request, session conversation, application, singleton and dependent contexts.
| Modifier and Type | Method and Description |
|---|---|
void |
activateContext(Class<? extends Annotation> scopeType)
Activate the context with the given scope type.
|
void |
deActivateContext(Class<? extends Annotation> scopeType)
Deactivates the context with the given scope type.
|
void |
destroy(Object destroyObject)
Destroys container contexts service.
|
void |
endContext(Class<? extends Annotation> scopeType,
Object endParameters)
Ends the context with the given scope type.
|
javax.enterprise.context.spi.Context |
getCurrentContext(Class<? extends Annotation> scopeType)
Gets current context with given scope type with
respect to the current thread of execution.
|
void |
init(Object initializeObject)
Initialize container contexts service.
|
void |
startContext(Class<? extends Annotation> scopeType,
Object startParameter)
Starts the context with the given scope type.
|
boolean |
supportsContext(Class<? extends Annotation> scopeType)
If container supports the given scope type it returns
true, otherwise it return false.
|
void init(Object initializeObject)
initializeObject - any initialize objectvoid destroy(Object destroyObject)
destroyObject - any destroy parameterjavax.enterprise.context.spi.Context getCurrentContext(Class<? extends Annotation> scopeType)
If there is not current context, it returns null.
scopeType - context scope typeboolean supportsContext(Class<? extends Annotation> scopeType)
scopeType - scope typevoid startContext(Class<? extends Annotation> scopeType, Object startParameter) throws javax.enterprise.context.ContextException
scopeType - scope typestartParameter - any parameterjavax.enterprise.context.ContextException - if any exception thrown by starting context,
it is wrapped inside ContextException and thrown.void endContext(Class<? extends Annotation> scopeType, Object endParameters)
scopeType - scope typeendParameters - any end parametervoid activateContext(Class<? extends Annotation> scopeType)
scopeType - scope typevoid deActivateContext(Class<? extends Annotation> scopeType)
scopeType - scope typeCopyright © 2008-2013 The Apache Software Foundation. All Rights Reserved.