Class LifeCycleCallbackCollection
- java.lang.Object
-
- org.eclipse.jetty.plus.annotation.LifeCycleCallbackCollection
-
public class LifeCycleCallbackCollection extends Object
LifeCycleCallbackCollection
-
-
Field Summary
Fields Modifier and Type Field Description static StringLIFECYCLE_CALLBACK_COLLECTION
-
Constructor Summary
Constructors Constructor Description LifeCycleCallbackCollection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(LifeCycleCallback callback)Add a Callback to the list of callbacks.voidcallPostConstructCallback(Object o)Call the method, if one exists, that is annotated with@PostConstructor with<post-construct>in web.xmlvoidcallPreDestroyCallback(Object o)Call the method, if one exists, that is annotated with@PreDestroyor with<pre-destroy>in web.xmlMap<String,List<LifeCycleCallback>>getPostConstructCallbackMap()Generate a read-only view of the post-construct callbacksCollection<LifeCycleCallback>getPostConstructCallbacks()Amalgamate all post-construct callbacks and return a read only listList<LifeCycleCallback>getPostConstructCallbacks(Object o)Map<String,List<LifeCycleCallback>>getPreDestroyCallbackMap()Generate a read-only view of the pre-destroy callbacksCollection<LifeCycleCallback>getPreDestroyCallbacks()Amalgamate all pre-destroy callbacks and return a read only listList<LifeCycleCallback>getPreDestroyCallbacks(Object o)
-
-
-
Field Detail
-
LIFECYCLE_CALLBACK_COLLECTION
public static final String LIFECYCLE_CALLBACK_COLLECTION
- See Also:
- Constant Field Values
-
-
Method Detail
-
add
public void add(LifeCycleCallback callback)
Add a Callback to the list of callbacks.- Parameters:
callback- the callback
-
getPreDestroyCallbacks
public List<LifeCycleCallback> getPreDestroyCallbacks(Object o)
-
getPostConstructCallbacks
public List<LifeCycleCallback> getPostConstructCallbacks(Object o)
-
callPostConstructCallback
public void callPostConstructCallback(Object o) throws Exception
Call the method, if one exists, that is annotated with@PostConstructor with<post-construct>in web.xml- Parameters:
o- the object on which to attempt the callback- Throws:
Exception- if unable to callPostConstructCallback
-
callPreDestroyCallback
public void callPreDestroyCallback(Object o) throws Exception
Call the method, if one exists, that is annotated with@PreDestroyor with<pre-destroy>in web.xml- Parameters:
o- the object on which to attempt the callback- Throws:
Exception- if unable to callPreDestroyCallback
-
getPostConstructCallbackMap
public Map<String,List<LifeCycleCallback>> getPostConstructCallbackMap()
Generate a read-only view of the post-construct callbacks- Returns:
- the map of
PostConstructCallbacks
-
getPreDestroyCallbackMap
public Map<String,List<LifeCycleCallback>> getPreDestroyCallbackMap()
Generate a read-only view of the pre-destroy callbacks- Returns:
- the map of
PreDestroyCallbacks
-
getPostConstructCallbacks
public Collection<LifeCycleCallback> getPostConstructCallbacks()
Amalgamate all post-construct callbacks and return a read only list- Returns:
- the collection of
PostConstructCallbacks
-
getPreDestroyCallbacks
public Collection<LifeCycleCallback> getPreDestroyCallbacks()
Amalgamate all pre-destroy callbacks and return a read only list- Returns:
- the collection of
PreDestroyCallbacks
-
-