|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An Availability contract between the container and the component.
A component that implements AvailabilityAware, is capable to be notified that components that it has previously looked up via the ServiceManager.lookup() method are made available and non-available, and can gracefully handle unavailability.
Containers are only required to support this interface, if the container supports dynamic loading/unloading of components, hot-deploys, remote components and similar cases where components may disappear for a shorter or longer period of time.
Method Summary | |
void |
componentAvailable(java.lang.String key)
Notification that component is available. |
void |
componentUnavailable(java.lang.String key)
Notification that component is no longer available. |
Method Detail |
public void componentAvailable(java.lang.String key)
The component that previously has been looked up in the ServiceManager, using key is now available. This method can either be called after the componentUnavailable() method signalled that a component is no longer available, OR if the ServiceManager.lookup() returned a null (optional lookup) indicating that the requested component didn't exist.
This method will NOT be called with a key argument that has not been used in a ServiceManager.lookup() previously.
key
- The key that was used to lookup the component in the
ServiceManager earlier.public void componentUnavailable(java.lang.String key)
The component that previously has been looked up in the ServiceManager, using key is no longer available. The container does not place any restrictions on how long the component will be unavailble, and the AvailabilityAware component, must employ one or more strategies on how to gracefully handle short and long absences of dependent components.
This method will NOT be called with a key argument that has not been used in a ServiceManager.lookup() previously.
key
- The key that was used to lookup the component in the
ServiceManager earlier.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |