Class CommandScopeContext

java.lang.Object
com.echothree.util.server.cdi.CommandScopeContext
All Implemented Interfaces:
javax.enterprise.context.spi.Context

public class CommandScopeContext extends Object implements javax.enterprise.context.spi.Context
  • Constructor Details

  • Method Details

    • getScope

      public Class<? extends Annotation> getScope()
      Specified by:
      getScope in interface javax.enterprise.context.spi.Context
    • isActive

      public boolean isActive()
      Specified by:
      isActive in interface javax.enterprise.context.spi.Context
    • activate

      public void activate()
      Activate the root scope for the current thread if not already active. Typically called at the start of a request.
    • deactivate

      public void deactivate()
      Deactivate the scope for the current thread, destroying all layers. Typically called at the end of a request.
    • push

      Push a new nested layer on top of the current one. Returns an AutoCloseable handle so you can use try-with-resources.
    • pop

      public void pop()
      Pop the current layer, destroying its beans.
    • get

      public <T> T get(javax.enterprise.context.spi.Contextual<T> contextual, javax.enterprise.context.spi.CreationalContext<T> creationalContext)
      Specified by:
      get in interface javax.enterprise.context.spi.Context
    • get

      public <T> T get(javax.enterprise.context.spi.Contextual<T> contextual)
      Specified by:
      get in interface javax.enterprise.context.spi.Context