public interface Dependency
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.Modifier and Type | Method and Description |
---|---|
boolean |
isAvailable()
Returns
true if the dependency is available. |
boolean |
isRequired()
Returns
true if this a required dependency. |
void |
start(Service service)
Starts tracking the dependency.
|
void |
stop(Service service)
Stops tracking the dependency.
|
boolean isRequired()
true
if this a required dependency. Required dependencies
are dependencies that must be available before the service can be activated.true
if the dependency is requiredboolean isAvailable()
true
if the dependency is available.true
if the dependency is availablevoid start(Service service)
dependencyAvailable()
on the service.service
- the service that is associated with this dependencyvoid stop(Service service)
dependencyUnavaible()
before stopping itself to ensure
that dependencies that aren't "active" are unavailable.Copyright © 2006–2013 The Apache Software Foundation. All rights reserved.