javax.context
Interface Contextual<T>

All Known Implementing Classes:
Bean, Decorator, Interceptor

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 © 2008-2009. All Rights Reserved.