org.springframework.beans.factory.support
Class DisposableBeanAdapter
java.lang.Object
org.springframework.beans.factory.support.DisposableBeanAdapter
- All Implemented Interfaces:
- Runnable, DisposableBean
class DisposableBeanAdapter
- extends Object
- implements DisposableBean, Runnable
Adapter that implements the DisposableBean interface performing
various destruction steps on a given bean instance:
- DestructionAwareBeanPostProcessors
- the bean implementing DisposableBean itself
- a custom destroy method specified on the bean definition
- Since:
- 2.0
- Author:
- Juergen Hoeller
- See Also:
AbstractBeanFactory,
DisposableBean,
DestructionAwareBeanPostProcessor,
AbstractBeanDefinition.getDestroyMethodName()
|
Method Summary |
void |
destroy()
Invoked by a BeanFactory on destruction of a singleton. |
void |
run()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DisposableBeanAdapter
public DisposableBeanAdapter(Object bean,
String beanName,
RootBeanDefinition mergedBeanDefinition,
List beanPostProcessors)
- Create a new DisposableBeanAdapter for the given bean.
- Parameters:
bean - the bean instance (never null)beanName - the name of the beanmergedBeanDefinition - the merged bean definition, if anybeanPostProcessors - the List of BeanPostProcessors
(potentially DestructionAwareBeanPostProcessor), if any
run
public void run()
- Specified by:
run in interface Runnable
destroy
public void destroy()
- Description copied from interface:
DisposableBean
- Invoked by a BeanFactory on destruction of a singleton.
- Specified by:
destroy in interface DisposableBean
Copyright © 2002-2006 The Spring Framework.