Package org.int4.dirk.library
Class AnnotationBasedLifeCycleCallbacksFactory
- java.lang.Object
-
- org.int4.dirk.library.AnnotationBasedLifeCycleCallbacksFactory
-
- All Implemented Interfaces:
LifeCycleCallbacksFactory
public class AnnotationBasedLifeCycleCallbacksFactory extends java.lang.Object implements LifeCycleCallbacksFactory
Implementation of aLifeCycleCallbacksFactorywhich determines which life cycle methods to call based on configurable annotations.
-
-
Constructor Summary
Constructors Constructor Description AnnotationBasedLifeCycleCallbacksFactory(java.lang.Class<? extends java.lang.annotation.Annotation> postConstruct, java.lang.Class<? extends java.lang.annotation.Annotation> preDestroy)Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LifeCycleCallbackscreate(java.lang.Class<?> cls)
-
-
-
Constructor Detail
-
AnnotationBasedLifeCycleCallbacksFactory
public AnnotationBasedLifeCycleCallbacksFactory(java.lang.Class<? extends java.lang.annotation.Annotation> postConstruct, java.lang.Class<? extends java.lang.annotation.Annotation> preDestroy)Constructs a new instance.- Parameters:
postConstruct- a marker annotationClassfor post construct methods, cannot benullpreDestroy- a marker annotationClassfor pre-destroy methods, cannot benull
-
-
Method Detail
-
create
public LifeCycleCallbacks create(java.lang.Class<?> cls) throws org.int4.dirk.api.definition.DefinitionException
- Specified by:
createin interfaceLifeCycleCallbacksFactory- Throws:
org.int4.dirk.api.definition.DefinitionException
-
-