Forge - Addon Container 2.0.0.Alpha3

org.jboss.forge.container.util.cdi
Interface ContextualLifecycle<T>

Type Parameters:
T - the class of the bean instance

public interface ContextualLifecycle<T>

Callbacks used by org.apache.deltaspike.core.util.bean.BeanBuilder and org.apache.deltaspike.core.util.bean.ImmutableBeanWrapper to allow control of the creation and destruction of a custom bean.


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

Method Detail

create

T create(javax.enterprise.inject.spi.Bean<T> bean,
         javax.enterprise.context.spi.CreationalContext<T> creationalContext)
Callback invoked by a 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(javax.enterprise.inject.spi.Bean<T> bean,
             T instance,
             javax.enterprise.context.spi.CreationalContext<T> creationalContext)
Callback invoked by a 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

Forge - Addon Container 2.0.0.Alpha3

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.