javax.enterprise.context.spi
Interface Contextual<T>

All Known Subinterfaces:
Bean<T>, Decorator<T>, Interceptor<T>

public interface Contextual<T>

The contract between a context and a contextual type This interface should not be implemented directly by the application.

Author:
Nicklas Karlsson, Pete Muir

Method Summary
 T create(CreationalContext<T> creationalContext)
          Create a new instance of the contextual type
 void destroy(T instance, CreationalContext<T> creationalContext)
          Destroys an instance of the contexual type
 

Method Detail

create

T create(CreationalContext<T> creationalContext)
Create a new instance of the contextual type

Parameters:
creationalContext - the creational context in which incompletely initialized contexts may be placed
Returns:
the contextual instance
Throws:
CreationException - if a checked exception occurs whilst creating the instance

destroy

void destroy(T instance,
             CreationalContext<T> creationalContext)
Destroys an instance of the contexual type

Parameters:
instance - the insance to destroy
creationalContext - the creational context used to create the instance


Copyright © 2008-2009. All Rights Reserved.