Class LifeCycleCallbackCollection


  • public class LifeCycleCallbackCollection
    extends java.lang.Object
    LifeCycleCallbackCollection
    • Field Detail

      • LIFECYCLE_CALLBACK_COLLECTION

        public static final java.lang.String LIFECYCLE_CALLBACK_COLLECTION
        See Also:
        Constant Field Values
    • Constructor Detail

      • LifeCycleCallbackCollection

        public LifeCycleCallbackCollection()
    • Method Detail

      • add

        public void add​(LifeCycleCallback callback)
        Add a Callback to the list of callbacks.
        Parameters:
        callback - the callback
      • getPreDestroyCallbacks

        public java.util.List<LifeCycleCallback> getPreDestroyCallbacks​(java.lang.Object o)
      • getPostConstructCallbacks

        public java.util.List<LifeCycleCallback> getPostConstructCallbacks​(java.lang.Object o)
      • callPostConstructCallback

        public void callPostConstructCallback​(java.lang.Object o)
                                       throws java.lang.Exception
        Call the method, if one exists, that is annotated with @PostConstruct or with <post-construct> in web.xml
        Parameters:
        o - the object on which to attempt the callback
        Throws:
        java.lang.Exception - if unable to call PostConstructCallback
      • callPreDestroyCallback

        public void callPreDestroyCallback​(java.lang.Object o)
                                    throws java.lang.Exception
        Call the method, if one exists, that is annotated with @PreDestroy or with <pre-destroy> in web.xml
        Parameters:
        o - the object on which to attempt the callback
        Throws:
        java.lang.Exception - if unable to call PreDestroyCallback
      • getPostConstructCallbackMap

        public java.util.Map<java.lang.String,​java.util.List<LifeCycleCallback>> getPostConstructCallbackMap()
        Generate a read-only view of the post-construct callbacks
        Returns:
        the map of PostConstructCallbacks
      • getPreDestroyCallbackMap

        public java.util.Map<java.lang.String,​java.util.List<LifeCycleCallback>> getPreDestroyCallbackMap()
        Generate a read-only view of the pre-destroy callbacks
        Returns:
        the map of PreDestroyCallbacks
      • getPostConstructCallbacks

        public java.util.Collection<LifeCycleCallback> getPostConstructCallbacks()
        Amalgamate all post-construct callbacks and return a read only list
        Returns:
        the collection of PostConstructCallbacks
      • getPreDestroyCallbacks

        public java.util.Collection<LifeCycleCallback> getPreDestroyCallbacks()
        Amalgamate all pre-destroy callbacks and return a read only list
        Returns:
        the collection of PreDestroyCallbacks