org.apache.felix.dependencymanager
Interface Dependency

All Known Implementing Classes:
ConfigurationDependency, ConfigurationDependencyImpl, ServiceDependency, ServiceDependencyImpl

public interface Dependency

Generic dependency for a service. A dependency can be required or not. A dependency will be activated by the service it belongs to. The service will call the start(Service service) and stop(Service service) methods. After it has been started, a dependency must callback the associated service's dependencyAvailable() and dependencyUnavailable() methods. State changes of the dependency itself may only be made as long as the dependency is not 'active', meaning it is associated with a running service.

Author:
Felix Project Team

Method Summary
 boolean isAvailable()
          Returns true if the dependency is available.
 boolean isRequired()
          Returns true if this a required dependency.
 

Method Detail

isRequired

boolean isRequired()
Returns true if this a required dependency. Required dependencies are dependencies that must be available before the service can be activated.

Returns:
true if the dependency is required

isAvailable

boolean isAvailable()
Returns true if the dependency is available.

Returns:
true if the dependency is available


Copyright © 2011 Apache Software Foundation. All Rights Reserved.