Interface ManagedContext

All Superinterfaces:
jakarta.enterprise.context.spi.AlterableContext, jakarta.enterprise.context.spi.Context, WeldAlterableContext
All Known Subinterfaces:
BoundConversationContext, BoundRequestContext, BoundSessionContext, ConversationContext, EjbRequestContext, HttpConversationContext, HttpRequestContext, HttpSessionContext, RequestContext, SessionContext

public interface ManagedContext extends WeldAlterableContext

Lifecycle management for built in contexts. ManagedContext only allows a context to be activated, deactivated and destroyed. It does not allow the context to be associated with an underlying data store. These operations are defined on BoundContext.

Weld provides a number of managed contexts: SessionContext, ConversationContext, RequestContext. All these managed contexts are scoped to the thread, and propagation of the backing store between threads is the responsibility of the managed context user.

Author:
Pete Muir
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Activate the Context.
    void
    Deactivate the Context, destroying any instances if the context is invalid.
    void
    Mark the context as due for destruction when deactivate is called.

    Methods inherited from interface jakarta.enterprise.context.spi.AlterableContext

    destroy

    Methods inherited from interface jakarta.enterprise.context.spi.Context

    get, get, getScope, isActive

    Methods inherited from interface org.jboss.weld.context.WeldAlterableContext

    clearAndSet, getAllContextualInstances
  • Method Details

    • activate

      void activate()
      Activate the Context.
    • deactivate

      void deactivate()
      Deactivate the Context, destroying any instances if the context is invalid.
    • invalidate

      void invalidate()
      Mark the context as due for destruction when deactivate is called.