Package io.quarkus.arc
Interface ManagedContext
-
- All Superinterfaces:
jakarta.enterprise.context.spi.AlterableContext
,jakarta.enterprise.context.spi.Context
,InjectableContext
public interface ManagedContext extends InjectableContext
A context implementing this interface can be manually managed. It can be activated with certain state hence allowing for context propagation and then deactivated on demand.- Author:
- Martin Kouba
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.quarkus.arc.InjectableContext
InjectableContext.ContextState
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default InjectableContext.ContextState
activate()
Activate the context with no initial state.InjectableContext.ContextState
activate(InjectableContext.ContextState initialState)
Activate the context.default void
activate$$bridge()
default void
activate$$bridge(InjectableContext.ContextState initialState)
void
deactivate()
Deactivate the context - do not destoy existing contextual instances.default void
terminate()
Destroy and deactivate the context.-
Methods inherited from interface jakarta.enterprise.context.spi.Context
get, get, getScope, isActive
-
Methods inherited from interface io.quarkus.arc.InjectableContext
destroy, destroy, getIfActive, getState, getStateIfActive, isNormal
-
-
-
-
Method Detail
-
activate
default InjectableContext.ContextState activate()
Activate the context with no initial state.- Returns:
- the context state
-
activate$$bridge
default void activate$$bridge()
-
activate
InjectableContext.ContextState activate(InjectableContext.ContextState initialState)
Activate the context.If invoked with
null
parameter, a freshInjectableContext.ContextState
is automatically created.- Parameters:
initialState
- The initial state, may benull
- Returns:
- the context state
-
activate$$bridge
default void activate$$bridge(InjectableContext.ContextState initialState)
-
deactivate
void deactivate()
Deactivate the context - do not destoy existing contextual instances.
-
terminate
default void terminate()
Destroy and deactivate the context.
-
-