public class AnnotatedMethodDestroyable extends java.lang.Object implements Destroyable
| Constructor and Description |
|---|
AnnotatedMethodDestroyable(java.lang.reflect.Method method,
java.lang.Object instance) |
| Modifier and Type | Method and Description |
|---|---|
void |
preDestroy()
Called on context shutdown (by default on jvm shutdown), but may be called manually through destroy manager
ru.vyarus.guice.ext.managed.destroyable.DestroyableManager#destroy(). |
public AnnotatedMethodDestroyable(java.lang.reflect.Method method,
java.lang.Object instance)
public void preDestroy()
throws java.lang.Exception
Destroyableru.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).preDestroy in interface Destroyablejava.lang.Exception - on any unrecoverable error