Package org.jboss.cdi.tck.spi
Interface Contexts<T extends jakarta.enterprise.context.spi.Context>
- Type Parameters:
T
- The concrete context type of the implementation
public interface Contexts<T extends jakarta.enterprise.context.spi.Context>
This interface provides operations relating to Contexts.
The TCK porting package must provide an implementation of this interface which is suitable for the target implementation.
- Author:
- Shane Bryzak, Pete Muir
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroyContext
(T context) Destroy the context.Returns the dependent context, regardless of whether it is active or notGet the request context, regardless of whether it is active or notvoid
Sets the specified context as active.void
setInactive
(T context) Sets the specified context as inactive.
-
Field Details
-
PROPERTY_NAME
-
-
Method Details
-
setActive
Sets the specified context as active.The set of existing contextual instances of the context is preserved across invocations of
setActive(Context)
andsetInactive(Context)
.- Parameters:
context
- The context to set active
-
setInactive
Sets the specified context as inactive.The set of existing contextual instances of the context is preserved across invocations of
setActive(Context)
andsetInactive(Context)
.- Parameters:
context
- The context to set inactive
-
getRequestContext
T getRequestContext()Get the request context, regardless of whether it is active or not- Returns:
- The request context
-
getDependentContext
T getDependentContext()Returns the dependent context, regardless of whether it is active or not- Returns:
- the dependent context
-
destroyContext
Destroy the context. This operation is defined by the CDI specification but has no API.- Parameters:
context
- the context to destroy
-