站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.1.0 API 文档英文版

DestructionAwareBeanPostProcessor (Spring Framework API 2.1) - Spring Framework 2.1.0 API 文档英文版


The Spring Framework

org.springframework.beans.factory.config
Interface DestructionAwareBeanPostProcessor

All Superinterfaces:
BeanPostProcessor
All Known Implementing Classes:
ActionServletAwareProcessor, CommonAnnotationBeanPostProcessor, InitDestroyAnnotationBeanPostProcessor, SimplePortletPostProcessor, SimpleServletPostProcessor

public interface DestructionAwareBeanPostProcessor
extends BeanPostProcessor

Subinterface of BeanPostProcessor that adds a before-destruction callback.

The typical usage will be to invoke custom destruction callbacks on specific bean types, matching corresponding initialization callbacks.

Since:
1.0.1
Author:
Juergen Hoeller
See Also:
ActionServletAwareProcessor

Method Summary
 void postProcessBeforeDestruction(Object bean, String beanName)
          Apply this BeanPostProcessor to the given bean instance before its destruction.
 
Methods inherited from interface org.springframework.beans.factory.config.BeanPostProcessor
postProcessAfterInitialization, postProcessBeforeInitialization
 

Method Detail

postProcessBeforeDestruction

void postProcessBeforeDestruction(Object bean,
                                  String beanName)
                                  throws BeansException
Apply this BeanPostProcessor to the given bean instance before its destruction. Can invoke custom destruction callbacks.

Like DisposableBean's destroy and a custom destroy method, this callback just applies to singleton beans in the factory (including inner beans).

Parameters:
bean - the bean instance to be destroyed
beanName - the name of the bean
Throws:
BeansException - in case of errors
See Also:
DisposableBean, AbstractBeanDefinition.setDestroyMethodName(java.lang.String)

The Spring Framework

Copyright © 2002-2007 The Spring Framework.