public abstract class AbstractContextsService extends Object implements ContextsService
Constructor and Description |
---|
AbstractContextsService() |
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.
|
public void destroy(Object destroyObject)
ContextsService
destroy
in interface ContextsService
destroyObject
- any destroy parameterpublic void endContext(Class<? extends Annotation> scopeType, Object endParameters)
ContextsService
endContext
in interface ContextsService
scopeType
- scope typeendParameters
- any end parameterpublic javax.enterprise.context.spi.Context getCurrentContext(Class<? extends Annotation> scopeType)
ContextsService
If there is not current context, it returns null.
getCurrentContext
in interface ContextsService
scopeType
- context scope typepublic void init(Object initializeObject)
ContextsService
init
in interface ContextsService
initializeObject
- any initialize objectpublic void startContext(Class<? extends Annotation> scopeType, Object startParameter) throws javax.enterprise.context.ContextException
ContextsService
startContext
in interface ContextsService
scopeType
- scope typestartParameter
- any parameterjavax.enterprise.context.ContextException
- if any exception thrown by starting context,
it is wrapped inside ContextException
and thrown.public boolean supportsContext(Class<? extends Annotation> scopeType)
ContextsService
supportsContext
in interface ContextsService
scopeType
- scope typepublic void activateContext(Class<? extends Annotation> scopeType)
ContextsService
activateContext
in interface ContextsService
scopeType
- scope typepublic void deActivateContext(Class<? extends Annotation> scopeType)
ContextsService
deActivateContext
in interface ContextsService
scopeType
- scope typeCopyright © 2008–2016 The Apache Software Foundation. All rights reserved.