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 Modifier and Type Field Description static String
PROPERTY_NAME
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
destroyContext(T context)
Destroy the context.T
getDependentContext()
Returns the dependent context, regardless of whether it is active or notT
getRequestContext()
Get the request context, regardless of whether it is active or notvoid
setActive(T context)
Sets the specified context as active.void
setInactive(T context)
Sets the specified context as inactive.
-
-
-
Field Detail
-
PROPERTY_NAME
static final String PROPERTY_NAME
-
-
Method Detail
-
setActive
void setActive(T context)
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
void setInactive(T context)
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
void destroyContext(T context)
Destroy the context. This operation is defined by the CDI specification but has no API.- Parameters:
context
- the context to destroy
-
-