Top Description Methods
org.apache.avalon.framework.availability

public Interface AvailabilityAware


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.

Author
Avalon Development Team
Since
4.5
Version
$Id$

Method Summary

Modifier and TypeMethod and Description
public void
componentAvailable(String
The key that was used to lookup the component in the ServiceManager earlier.
key
)

Notification that component is available.

public void
componentUnavailable(String
The key that was used to lookup the component in the ServiceManager earlier.
key
)

Notification that component is no longer available.

Method Detail

componentAvailableback to summary
public void componentAvailable(String key)

Notification that component is available.

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.

Parameters
key:String

The key that was used to lookup the component in the ServiceManager earlier.

componentUnavailableback to summary
public void componentUnavailable(String key)

Notification that component is no longer available.

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.

Parameters
key:String

The key that was used to lookup the component in the ServiceManager earlier.