T
- public class DelegatingContextualLifecycle<T> extends Object implements ContextualLifecycle<T>
ContextualLifecycle
that is backed by an
InjectionTarget
.Constructor and Description |
---|
DelegatingContextualLifecycle(javax.enterprise.inject.spi.InjectionTarget<T> injectionTarget)
Instantiate a new
ContextualLifecycle backed by an
InjectionTarget . |
Modifier and Type | Method and Description |
---|---|
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. |
public DelegatingContextualLifecycle(javax.enterprise.inject.spi.InjectionTarget<T> injectionTarget)
ContextualLifecycle
backed by an
InjectionTarget
.injectionTarget
- the InjectionTarget
used to create and
destroy instancespublic T create(javax.enterprise.inject.spi.Bean<T> bean, javax.enterprise.context.spi.CreationalContext<T> creationalContext)
ContextualLifecycle
Contextual.create(CreationalContext)
is called.create
in interface ContextualLifecycle<T>
bean
- the bean initiating the callbackcreationalContext
- the context in which this instance was createdpublic void destroy(javax.enterprise.inject.spi.Bean<T> bean, T instance, javax.enterprise.context.spi.CreationalContext<T> creationalContext)
ContextualLifecycle
Contextual.destroy(Object, CreationalContext)
is called.destroy
in interface ContextualLifecycle<T>
bean
- the bean initiating the callbackinstance
- the contextual instance to destroycreationalContext
- the context in which this instance was createdCopyright © 2020 The Apache Software Foundation. All rights reserved.