org.jboss.seam.solder.bean
Interface ContextualLifecycle<T>

Type Parameters:
T - the class of the bean instance
All Known Implementing Classes:
DelegatingContextualLifecycle, ServiceHandlerBeanLifecycle

public interface ContextualLifecycle<T>

Callbacks used by BeanBuilder and ImmutableBean to allow control of the creation and destruction of a custom bean.

Author:
Stuart Douglas

Method Summary
 T create(Bean<T> bean, CreationalContext<T> creationalContext)
          Callback invoked by a Seam Solder created bean when Contextual.create(CreationalContext) is called.
 void destroy(Bean<T> bean, T instance, CreationalContext<T> creationalContext)
          Callback invoked by a Seam Solder created bean when Contextual.destroy(Object, CreationalContext) is called.
 

Method Detail

create

T create(Bean<T> bean,
         CreationalContext<T> creationalContext)
Callback invoked by a Seam Solder created bean when Contextual.create(CreationalContext) is called.

Parameters:
bean - the bean initiating the callback
creationalContext - the context in which this instance was created

destroy

void destroy(Bean<T> bean,
             T instance,
             CreationalContext<T> creationalContext)
Callback invoked by a Seam Solder created bean when Contextual.destroy(Object, CreationalContext) is called.

Parameters:
bean - the bean initiating the callback
instance - the contextual instance to destroy
creationalContext - the context in which this instance was created


Copyright © 2008-2011 Seam Framework. All Rights Reserved.