javax.context
Interface Contextual<T>

All Known Implementing Classes:
AbstractBean, AbstractClassBean, AbstractFacadeBean, AbstractJavaEEResourceBean, AbstractProducerBean, AbstractResourceBean, AbstractStandardBean, Bean, Decorator, DisposalMethodBean, EnterpriseBean, EventBean, ForwardingBean, InjectionPointBean, InstanceBean, Interceptor, JmsQueueBean, JmsTopicBean, ManagerBean, NewEnterpriseBean, NewSimpleBean, PersistenceContextBean, PersistenceUnitBean, ProducerFieldBean, ProducerMethodBean, RemoteEjbBean, ResourceBean, RIBean, SimpleBean, WebServiceBean

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)
          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)
Destroys an instance of the contexual type

Parameters:
instance - the insance to destroy


Copyright © 2011. All Rights Reserved.