Interface Dependent
-
- All Known Implementing Classes:
OptionalDependency,ServiceControllerImpl
interface DependentDepends on one or more dependencies, represented byAbstractDependency.- See Also:
Dependency
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddependencyFailed()Notify this dependent that one of its dependencies (immediate or transitive) failed to start.voiddependencyFailureCleared()Notify this dependent that all dependency failures previouslynotifiedare now cleared.ServiceControllerImpl<?>getController()Get the controller of this dependent.voidimmediateDependencyAvailable(ServiceName dependencyName)Notify this dependent that one of its immediate dependencies is available, i.e., it is installed and, if notstarted, should start shortly.voidimmediateDependencyDown()Notify this dependent that one of its immediate dependencies is leaving theUPstate.voidimmediateDependencyUnavailable(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 inNEVERmode.voidimmediateDependencyUp()Notify this dependent that one of its immediate dependencies enteredUPstate.voidtransitiveDependencyAvailable()Notify this dependent that allunavailabletransitive dependencies are now available (i.e., they are installed and will perform an attempt to start shortly).voidtransitiveDependencyUnavailable()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 inNEVERmode.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 enteredUPstate.This method must not be called under a lock.
-
immediateDependencyDown
void immediateDependencyDown()
Notify this dependent that one of its immediate dependencies is leaving theUPstate.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 fromSTARTINGtoSTART_FAILED.Dependency failures that occur after the notified failure do not result in new
dependencyFailednotifications, as the dependent will never receive two or more dependencyFailed calls in a row. AdependencyFailednotification 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 previouslynotifiedare now cleared. This method is called only after all affected dependencies leftSTART_FAILEDstate.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
dependencyUnavailablenotifications, as the dependent will never receive two or more dependencyUnavailable calls in a row. AdependencyUnavailablenotification 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 allunavailabletransitive 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
-
-