public class WebContextsService extends AbstractContextsService
ContextsService
implementation.Modifier and Type | Field and Description |
---|---|
protected FailOverService |
failoverService |
Constructor and Description |
---|
WebContextsService(WebBeansContext webBeansContext)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
activateContext(Class<? extends Annotation> scopeType)
This might be needed when you aim to start a new thread in a WebApp.
|
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.
|
SessionContextManager |
getSessionContextManager() |
void |
init(Object initializeObject)
Initialize container contexts service.
|
static void |
removeThreadLocals()
Removes the ThreadLocals from the ThreadMap to prevent memory leaks.
|
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.
|
deActivateContext
protected FailOverService failoverService
public WebContextsService(WebBeansContext webBeansContext)
public static void removeThreadLocals()
public SessionContextManager getSessionContextManager()
public void init(Object initializeObject)
init
in interface ContextsService
init
in class AbstractContextsService
initializeObject
- any initialize objectpublic void destroy(Object destroyObject)
destroy
in interface ContextsService
destroy
in class AbstractContextsService
destroyObject
- any destroy parameterpublic void endContext(Class<? extends Annotation> scopeType, Object endParameters)
endContext
in interface ContextsService
endContext
in class AbstractContextsService
scopeType
- scope typeendParameters
- any end parameterpublic javax.enterprise.context.spi.Context getCurrentContext(Class<? extends Annotation> scopeType)
If there is not current context, it returns null.
getCurrentContext
in interface ContextsService
getCurrentContext
in class AbstractContextsService
scopeType
- context scope typepublic void startContext(Class<? extends Annotation> scopeType, Object startParameter) throws javax.enterprise.context.ContextException
startContext
in interface ContextsService
startContext
in class AbstractContextsService
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)
supportsContext
in interface ContextsService
supportsContext
in class AbstractContextsService
scopeType
- scope typepublic void activateContext(Class<? extends Annotation> scopeType)
activateContext
in interface ContextsService
activateContext
in class AbstractContextsService
scopeType
- Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.