Class LifeCycleCallbackCollection
java.lang.Object
org.eclipse.jetty.plus.annotation.LifeCycleCallbackCollection
LifeCycleCallbackCollection
This class collects the classes and methods that have been configured
in web.xml with postconstruct/predestroy callbacks, or that contain the
equivalent annotations.  It is also responsible for calling the 
callbacks.
This class is not threadsafe for concurrent modifications, but is
threadsafe for reading with concurrent modifications.
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidadd(LifeCycleCallback callback) Add a Callback to the list of callbacks.voidCall the method, if one exists, that is annotated with@PostConstructor with<post-construct>in web.xmlvoidCall the method, if one exists, that is annotated with@PreDestroyor with<pre-destroy>in web.xmlGenerate a read-only view of the post-construct callbacksAmalgamate all post-construct callbacks and return a read only setGenerate a read-only view of the pre-destroy callbacksAmalgamate all pre-destroy callbacks and return a read only set 
- 
Field Details
- 
LIFECYCLE_CALLBACK_COLLECTION
- See Also:
 
 
 - 
 - 
Constructor Details
- 
LifeCycleCallbackCollection
public LifeCycleCallbackCollection() 
 - 
 - 
Method Details
- 
add
Add a Callback to the list of callbacks.- Parameters:
 callback- the callback
 - 
getPreDestroyCallbacks
 - 
getPreDestroyCallbacks
Amalgamate all pre-destroy callbacks and return a read only set- Returns:
 - the collection of 
PreDestroyCallbacks 
 - 
getPostConstructCallbacks
 - 
getPostConstructCallbacks
Amalgamate all post-construct callbacks and return a read only set- Returns:
 - the collection of 
PostConstructCallbacks 
 - 
callPostConstructCallback
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
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
Generate a read-only view of the post-construct callbacks- Returns:
 - the map of 
PostConstructCallbacks 
 - 
getPreDestroyCallbackMap
Generate a read-only view of the pre-destroy callbacks- Returns:
 - the map of 
PreDestroyCallbacks 
 
 -