Class ContextWrapper

  • All Implemented Interfaces:
    javax.enterprise.context.spi.AlterableContext, javax.enterprise.context.spi.Context

    public class ContextWrapper
    extends Object
    implements javax.enterprise.context.spi.AlterableContext
    Used to bind multiple scope annotations to a single context. Will delegate all context-related operations to it's underlying instance, apart from getting the scope of the context.
    • Constructor Detail

      • ContextWrapper

        public ContextWrapper​(org.apache.deltaspike.core.util.context.AbstractContext context,
                              Class<? extends Annotation> scope)
    • Method Detail

      • getScope

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

        public <T> T get​(javax.enterprise.context.spi.Contextual<T> component,
                         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> component)
        Specified by:
        get in interface javax.enterprise.context.spi.Context
      • isActive

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

        public void destroy​(javax.enterprise.context.spi.Contextual<?> contextual)
        Specified by:
        destroy in interface javax.enterprise.context.spi.AlterableContext