Package org.n52.iceland.config.spring
Class LifecycleBeanPostProcessor
- java.lang.Object
-
- org.n52.iceland.config.spring.LifecycleBeanPostProcessor
-
- All Implemented Interfaces:
org.springframework.beans.factory.config.BeanPostProcessor,org.springframework.beans.factory.config.DestructionAwareBeanPostProcessor,org.springframework.core.Ordered,org.springframework.core.PriorityOrdered
public class LifecycleBeanPostProcessor extends Object implements org.springframework.beans.factory.config.DestructionAwareBeanPostProcessor, org.springframework.core.PriorityOrdered
Bean post processor that callsConstructable.init()andDestroyable.destroy()for every bean that implements these interfaces. In contrast to thePostConstructandPreDestroyannotations, these methods will also be called if they are declared in a super class of the bean. This postprocess will be called at the same stages,CommonAnnotationBeanPostProcessorwould be called: Constructor Bean-Injections Settings-Injections init() ... destroy()- Since:
- 1.0.0
- See Also:
Constructable,Destroyable
-
-
Constructor Summary
Constructors Constructor Description LifecycleBeanPostProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetOrder()ObjectpostProcessAfterInitialization(Object bean, String beanName)voidpostProcessBeforeDestruction(Object bean, String beanName)ObjectpostProcessBeforeInitialization(Object bean, String beanName)booleanrequiresDestruction(Object bean)voidsetOrder(int order)
-
-
-
Method Detail
-
getOrder
public int getOrder()
- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
setOrder
public void setOrder(int order)
-
postProcessAfterInitialization
public Object postProcessAfterInitialization(Object bean, String beanName)
- Specified by:
postProcessAfterInitializationin interfaceorg.springframework.beans.factory.config.BeanPostProcessor
-
postProcessBeforeDestruction
public void postProcessBeforeDestruction(Object bean, String beanName)
- Specified by:
postProcessBeforeDestructionin interfaceorg.springframework.beans.factory.config.DestructionAwareBeanPostProcessor
-
postProcessBeforeInitialization
public Object postProcessBeforeInitialization(Object bean, String beanName)
- Specified by:
postProcessBeforeInitializationin interfaceorg.springframework.beans.factory.config.BeanPostProcessor
-
requiresDestruction
public boolean requiresDestruction(Object bean)
- Specified by:
requiresDestructionin interfaceorg.springframework.beans.factory.config.DestructionAwareBeanPostProcessor
-
-