Interface Destroyable

  • All Known Implementing Classes:
    AnnotatedMethodDestroyable

    public interface Destroyable
    Marker interface for beans which require some finalization logic (@PostConstruct alternative).
    Since:
    30.06.2014
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method 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().
    • Method Detail

      • preDestroy

        void preDestroy()
                 throws java.lang.Exception
        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(). 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).
        Throws:
        java.lang.Exception - on any unrecoverable error