Interface LifeCycleCallbacks


  • public interface LifeCycleCallbacks
    Interface for calling life cycle methods on a given instance.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void postConstruct​(java.lang.Object instance)
      Calls all post construct life cycle methods which were discovered on a type on an instance of the same type.
      void preDestroy​(java.lang.Object instance)
      Calls all pre-destroy life cycle methods which were discovered on a type on an instance of the same type.
    • Method Detail

      • postConstruct

        void postConstruct​(java.lang.Object instance)
                    throws java.lang.reflect.InvocationTargetException
        Calls all post construct life cycle methods which were discovered on a type on an instance of the same type.
        Parameters:
        instance - an instance, cannot be null
        Throws:
        java.lang.reflect.InvocationTargetException - when a callback threw an exception
      • preDestroy

        void preDestroy​(java.lang.Object instance)
        Calls all pre-destroy life cycle methods which were discovered on a type on an instance of the same type.
        Parameters:
        instance - an instance, cannot be null