public class BeanCreatingHandlerProvider<T> extends java.lang.Object implements BeanFactoryAware
BeanFactory
and also provides
an equivalent destroy method. Mainly for internal use to assist with initializing and
destroying handlers with per-connection lifecycle.Constructor and Description |
---|
BeanCreatingHandlerProvider(java.lang.Class<? extends T> handlerType) |
Modifier and Type | Method and Description |
---|---|
void |
destroy(T handler) |
T |
getHandler() |
java.lang.Class<? extends T> |
getHandlerType() |
void |
setBeanFactory(BeanFactory beanFactory)
Callback that supplies the owning factory to a bean instance.
|
java.lang.String |
toString() |
public BeanCreatingHandlerProvider(java.lang.Class<? extends T> handlerType)
public void setBeanFactory(BeanFactory beanFactory)
BeanFactoryAware
Invoked after the population of normal bean properties
but before an initialization callback such as
InitializingBean.afterPropertiesSet()
or a custom init-method.
setBeanFactory
in interface BeanFactoryAware
beanFactory
- owning BeanFactory (never null
).
The bean can immediately call methods on the factory.BeanInitializationException
public void destroy(T handler)
public java.lang.Class<? extends T> getHandlerType()
public T getHandler()
public java.lang.String toString()
toString
in class java.lang.Object