Class DelegatingContextualLifecycle<T>

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T create​(javax.enterprise.inject.spi.Bean<T> bean, javax.enterprise.context.spi.CreationalContext<T> creationalContext)
      Callback invoked by a created bean when Contextual.create(CreationalContext) is called.
      void destroy​(javax.enterprise.inject.spi.Bean<T> bean, T instance, javax.enterprise.context.spi.CreationalContext<T> creationalContext)
      Callback invoked by a created bean when Contextual.destroy(Object, CreationalContext) is called.
    • Constructor Detail

      • DelegatingContextualLifecycle

        public DelegatingContextualLifecycle​(javax.enterprise.inject.spi.InjectionTarget<T> injectionTarget)
        Instantiate a new ContextualLifecycle backed by an InjectionTarget.
        Parameters:
        injectionTarget - the InjectionTarget used to create and destroy instances
    • Method Detail

      • create

        public T create​(javax.enterprise.inject.spi.Bean<T> bean,
                        javax.enterprise.context.spi.CreationalContext<T> creationalContext)
        Description copied from interface: ContextualLifecycle
        Callback invoked by a created bean when Contextual.create(CreationalContext) is called.
        Specified by:
        create in interface ContextualLifecycle<T>
        Parameters:
        bean - the bean initiating the callback
        creationalContext - the context in which this instance was created
      • destroy

        public void destroy​(javax.enterprise.inject.spi.Bean<T> bean,
                            T instance,
                            javax.enterprise.context.spi.CreationalContext<T> creationalContext)
        Description copied from interface: ContextualLifecycle
        Callback invoked by a created bean when Contextual.destroy(Object, CreationalContext) is called.
        Specified by:
        destroy in interface ContextualLifecycle<T>
        Parameters:
        bean - the bean initiating the callback
        instance - the contextual instance to destroy
        creationalContext - the context in which this instance was created