Interface Dependent
-
- All Known Implementing Classes:
OptionalDependency
,ServiceControllerImpl
interface Dependent
Depends on one or more dependencies, represented byAbstractDependency
.- See Also:
Dependency
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
dependencyFailed()
Notify this dependent that one of its dependencies (immediate or transitive) failed to start.void
dependencyFailureCleared()
Notify this dependent that all dependency failures previouslynotified
are now cleared.ServiceControllerImpl<?>
getController()
Get the controller of this dependent.void
immediateDependencyAvailable(ServiceName dependencyName)
Notify this dependent that one of its immediate dependencies is available, i.e., it is installed and, if notstarted
, should start shortly.void
immediateDependencyDown()
Notify this dependent that one of its immediate dependencies is leaving theUP
state.void
immediateDependencyUnavailable(ServiceName dependencyName)
Notify this dependent that one of its immediate dependencies is unavailable.
A dependency is unavailable when it is not installed or when it is inNEVER
mode.void
immediateDependencyUp()
Notify this dependent that one of its immediate dependencies enteredUP
state.void
transitiveDependencyAvailable()
Notify this dependent that allunavailable
transitive dependencies are now available (i.e., they are installed and will perform an attempt to start shortly).void
transitiveDependencyUnavailable()
Notify this dependent that one of its transitive dependencies is unavailable (either uninstalled, or inNEVER mode
).
-
-
-
Method Detail
-
immediateDependencyAvailable
void immediateDependencyAvailable(ServiceName dependencyName)
Notify this dependent that one of its immediate dependencies is available, i.e., it is installed and, if notstarted
, should start shortly.This method must not be called under a lock.
- Parameters:
dependencyName
- the name of the immediate dependency that is now available
-
immediateDependencyUnavailable
void immediateDependencyUnavailable(ServiceName dependencyName)
Notify this dependent that one of its immediate dependencies is unavailable.
A dependency is unavailable when it is not installed or when it is inNEVER
mode.This method must not be called under a lock.
- Parameters:
dependencyName
- the name of the immediate dependency that is now unavailable
-
immediateDependencyUp
void immediateDependencyUp()
Notify this dependent that one of its immediate dependencies enteredUP
state.This method must not be called under a lock.
-
immediateDependencyDown
void immediateDependencyDown()
Notify this dependent that one of its immediate dependencies is leaving theUP
state.This method must not be called under a lock.
-
dependencyFailed
void dependencyFailed()
Notify this dependent that one of its dependencies (immediate or transitive) failed to start. This method is called after the dependency state transitions fromSTARTING
toSTART_FAILED
.Dependency failures that occur after the notified failure do not result in new
dependencyFailed
notifications, as the dependent will never receive two or more dependencyFailed calls in a row. AdependencyFailed
notification is only invoked again to notify of new failures if the previous failures have beencleared
.This method must not be called under a lock.
-
dependencyFailureCleared
void dependencyFailureCleared()
Notify this dependent that all dependency failures previouslynotified
are now cleared. This method is called only after all affected dependencies leftSTART_FAILED
state.This method must not be called under a lock.
-
transitiveDependencyUnavailable
void transitiveDependencyUnavailable()
Notify this dependent that one of its transitive dependencies is unavailable (either uninstalled, or inNEVER mode
).New transitive dependencies that become unavailable after the notified one do not result in new
dependencyUnavailable
notifications, as the dependent will never receive two or more dependencyUnavailable calls in a row. AdependencyUnavailable
notification is only invoked again to notify of newly found unavailable dependencies if all the previously unavailable dependencies have becomeavailable
.This method must not be called under a lock.
-
transitiveDependencyAvailable
void transitiveDependencyAvailable()
Notify this dependent that allunavailable
transitive dependencies are now available (i.e., they are installed and will perform an attempt to start shortly).This method must not be called under a lock.
-
getController
ServiceControllerImpl<?> getController()
Get the controller of this dependent.- Returns:
- the controller
-
-