Package javax.enterprise.context.spi
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 theContextmust be defined asContextual. This interface defines the creating and destroying of the webbeans instances that are contained in the itsContextinstance.- Version:
- $Rev: 815435 $ $Date: 2009-09-15 20:18:44 +0200 (Tue, 15 Sep 2009) $
- See Also:
Context
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tcreate(CreationalContext<T> context)Creates and returns a new instance of the webbeans component.voiddestroy(T instance, CreationalContext<T> context)Destroys the instance.
-
-
-
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 instancecontext- creational context
-
-