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)Creates aLifeCycleCallbacksfor a given class.
-
-
-
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 DefinitionException
Description copied from interface:LifeCycleCallbacksFactoryCreates aLifeCycleCallbacksfor a given class.- Specified by:
createin interfaceLifeCycleCallbacksFactory- Parameters:
cls- aClass, cannot benull- Returns:
- a
LifeCycleCallbacks, nevernull - Throws:
DefinitionException- when a definition problem was encountered
-
-