Class AnnotatedMethodDestroyable
- java.lang.Object
-
- ru.vyarus.guice.ext.managed.destroyable.AnnotatedMethodDestroyable
-
- All Implemented Interfaces:
Destroyable
public class AnnotatedMethodDestroyable extends java.lang.Object implements Destroyable
Destroyable annotation used to call @PostConstruct annotated methods on context destroy.- Since:
- 30.06.2014
-
-
Constructor Summary
Constructors Constructor Description AnnotatedMethodDestroyable(java.lang.reflect.Method method, java.lang.Object instance)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidpreDestroy()Called on context shutdown (by default on jvm shutdown), but may be called manually through destroy managerru.vyarus.guice.ext.managed.destroyable.DestroyableManager#destroy().
-
-
-
Method Detail
-
preDestroy
public void preDestroy() throws java.lang.ExceptionDescription copied from interface:DestroyableCalled on context shutdown (by default on jvm shutdown), but may be called manually through destroy managerru.vyarus.guice.ext.managed.destroyable.DestroyableManager#destroy(). Will be called one time no matter how many time destroy will be asked by manager. It is safe to avoid explicit exception handling (except special cases required by logic).- Specified by:
preDestroyin interfaceDestroyable- Throws:
java.lang.Exception- on any unrecoverable error
-
-