T - The class of the original class.H - The class of the delegate InvocationHandler.public class DeltaSpikeProxyContextualLifecycle<T,H extends InvocationHandler> extends Object implements ContextualLifecycle<T>
ContextualLifecycle which handles a complete lifecycle of a proxy:
- creates a proxy via a DeltaSpikeProxyFactory
- handles the instantiation and injection of the proxy
- handles the instantiation via CDI of the delegate InvocationHandler and assign it to the proxy
- handles the release/destruction of both proxy and delegate InvocationHandler| Constructor and Description |
|---|
DeltaSpikeProxyContextualLifecycle(Class<T> targetClass,
Class<H> delegateInvocationHandlerClass,
DeltaSpikeProxyFactory proxyFactory,
javax.enterprise.inject.spi.BeanManager beanManager) |
| Modifier and Type | Method and Description |
|---|---|
T |
create(javax.enterprise.inject.spi.Bean bean,
javax.enterprise.context.spi.CreationalContext 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. |
protected H |
instantiateDelegateInvocationHandler() |
public DeltaSpikeProxyContextualLifecycle(Class<T> targetClass, Class<H> delegateInvocationHandlerClass, DeltaSpikeProxyFactory proxyFactory, javax.enterprise.inject.spi.BeanManager beanManager)
public T create(javax.enterprise.inject.spi.Bean bean, javax.enterprise.context.spi.CreationalContext creationalContext)
ContextualLifecycleContextual.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)
ContextualLifecycleContextual.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 createdprotected H instantiateDelegateInvocationHandler()
Copyright © 2015 The Apache Software Foundation. All rights reserved.