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 calls
and
annotations, 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,
Constructable.init() and
Destroyable.destroy() for every bean that implements these
interfaces. In contrast to the
invalid reference
javax.annotation.PostConstruct
invalid reference
javax.annotation.PreDestroy
CommonAnnotationBeanPostProcessor would be called:
Constructor
Bean-Injections
Settings-Injections
init()
...
destroy()- Since:
- 1.0.0
- See Also:
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetOrder()postProcessAfterInitialization(Object bean, String beanName) voidpostProcessBeforeDestruction(Object bean, String beanName) postProcessBeforeInitialization(Object bean, String beanName) booleanrequiresDestruction(Object bean) voidsetOrder(int order)
-
Constructor Details
-
LifecycleBeanPostProcessor
public LifecycleBeanPostProcessor()
-
-
Method Details
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
setOrder
public void setOrder(int order) -
postProcessAfterInitialization
- Specified by:
postProcessAfterInitializationin interfaceorg.springframework.beans.factory.config.BeanPostProcessor
-
postProcessBeforeDestruction
- Specified by:
postProcessBeforeDestructionin interfaceorg.springframework.beans.factory.config.DestructionAwareBeanPostProcessor
-
postProcessBeforeInitialization
- Specified by:
postProcessBeforeInitializationin interfaceorg.springframework.beans.factory.config.BeanPostProcessor
-
requiresDestruction
- Specified by:
requiresDestructionin interfaceorg.springframework.beans.factory.config.DestructionAwareBeanPostProcessor
-