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
  • Method Details

    • activate

      default InjectableContext.ContextState activate()
      Activate the context with no initial state.
      Returns:
      the context state
    • activate$$bridge

      default void activate$$bridge()
    • activate

      Activate the context.

      If invoked with null parameter, a fresh InjectableContext.ContextState is automatically created.

      Parameters:
      initialState - The initial state, may be null
      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.