Interface Contextual<T>

  • Type Parameters:
    T - type of the webbeans component
    All Known Subinterfaces:
    Bean<T>, Decorator<T>, Interceptor<T>

    public interface Contextual<T>
    Each webbeans instance that is contained in the Context must be defined as Contextual. This interface defines the creating and destroying of the webbeans instances that are contained in the its Context instance.
    Version:
    $Rev: 815435 $ $Date: 2009-09-15 20:18:44 +0200 (Tue, 15 Sep 2009) $
    See Also:
    Context
    • Method Detail

      • create

        T create​(CreationalContext<T> context)
        Creates and returns a new instance of the webbeans component.
        Parameters:
        context - new creational context instance
        Returns:
        the new instance of the webbeans component
        Throws:
        CreationException - if any exception occurs
      • destroy

        void destroy​(T instance,
                     CreationalContext<T> context)
        Destroys the instance. Any destroy logic is encapsulated in this method.
        Parameters:
        instance - already created webbeans instance
        context - creational context