Interface ServiceListener<S>
-
- Type Parameters:
S
- the service type
- All Known Implementing Classes:
AbstractServiceListener
,MultipleRemoveListener
,TimingServiceListener
@Deprecated public interface ServiceListener<S>
Deprecated.Service listeners are not encouraged for general user use. Users should useLifecycleListener
s instead. This class will be removed in a future release.A listener for service lifecycle events. The associated controller will not leave its current state until all listeners finish running.- Author:
- David M. Lloyd, Flavia Rainone, Richard Opalka
- See Also:
LifecycleListener
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
dependencyFailed(ServiceController<? extends S> controller)
Deprecated.A dependency of the service has failed.void
dependencyFailureCleared(ServiceController<? extends S> controller)
Deprecated.A dependency of the service is retrying to start.void
immediateDependencyAvailable(ServiceController<? extends S> controller)
Deprecated.Allunavailable
immediate dependencies of the service are now available, i.e., they are installed and are not administrativelydisabled
.void
immediateDependencyUnavailable(ServiceController<? extends S> controller)
Deprecated.An immediate dependency of the service is uninstalled or administrativelydisabled
.void
listenerAdded(ServiceController<? extends S> controller)
Deprecated.The listener has been added to a controller.void
serviceRemoveRequestCleared(ServiceController<? extends S> controller)
Deprecated.The service removal is canceled.void
serviceRemoveRequested(ServiceController<? extends S> controller)
Deprecated.The service is going to be removed.void
transition(ServiceController<? extends S> controller, ServiceController.Transition transition)
Deprecated.The service has transitioned to a new sub-state.void
transitiveDependencyAvailable(ServiceController<? extends S> controller)
Deprecated.Allunavailable
transitive dependencies of the service are now available (installed and not administrativelydisabled
).void
transitiveDependencyUnavailable(ServiceController<? extends S> controller)
Deprecated.A transitive dependency of the service is uninstalled or administrativelydisabled
.
-
-
-
Method Detail
-
listenerAdded
void listenerAdded(ServiceController<? extends S> controller)
Deprecated.The listener has been added to a controller.- Parameters:
controller
- the controller that this listener was added to
-
transition
void transition(ServiceController<? extends S> controller, ServiceController.Transition transition)
Deprecated.The service has transitioned to a new sub-state.- Parameters:
controller
- the controllertransition
- the transition that occurred
-
serviceRemoveRequested
void serviceRemoveRequested(ServiceController<? extends S> controller)
Deprecated.The service is going to be removed. Called when the service mode is changed toREMOVE
.- Parameters:
controller
- the controller
-
serviceRemoveRequestCleared
void serviceRemoveRequestCleared(ServiceController<? extends S> controller)
Deprecated.The service removal is canceled. Called when the service mode is changed fromREMOVE
to any other mode. Such a mode change can only be successfully performed ifsetMode
is called before the service is removed.- Parameters:
controller
- the controller.
-
dependencyFailed
void dependencyFailed(ServiceController<? extends S> controller)
Deprecated.A dependency of the service has failed. Called after the dependency state transitions fromSTARTING
toSTART_FAILED
.Dependency failures that occur after the notified failure do not result in new
dependencyFailed
notifications. A new call to this method will be made to notify new failures only if the previous failures have beencleared
.This method is invoked to notify both immediate and transitive dependency failures.
- Parameters:
controller
- the controller
-
dependencyFailureCleared
void dependencyFailureCleared(ServiceController<? extends S> controller)
Deprecated.A dependency of the service is retrying to start. Called after the dependency state transitions fromSTART_FAILED
toSTARTING
.- Parameters:
controller
- the controller
-
immediateDependencyUnavailable
void immediateDependencyUnavailable(ServiceController<? extends S> controller)
Deprecated.An immediate dependency of the service is uninstalled or administrativelydisabled
.Immediate dependencies that are subsequently unavailable do not result in new
immediateDependencyUnavailable
notifications. A new call to this method will only be made to notify newly found unavailable dependencies if the previously unavailable dependencies have beencleared
.- Parameters:
controller
- the controller
-
immediateDependencyAvailable
void immediateDependencyAvailable(ServiceController<? extends S> controller)
Deprecated.Allunavailable
immediate dependencies of the service are now available, i.e., they are installed and are not administrativelydisabled
.
This method will be invoked only afterimmediateDependencyUnavailable(ServiceController)
is called.- Parameters:
controller
- the controller
-
transitiveDependencyUnavailable
void transitiveDependencyUnavailable(ServiceController<? extends S> controller)
Deprecated.A transitive dependency of the service is uninstalled or administrativelydisabled
.Transitive dependencies that are subsequently unavailable do not result in new
transitiveDependencyUnavailable
notifications. A new call to this method will only be made to notify newly found unavailable dependencies if the previously unavailable dependencies have all becomeavailable
.- Parameters:
controller
- the controller
-
transitiveDependencyAvailable
void transitiveDependencyAvailable(ServiceController<? extends S> controller)
Deprecated.Allunavailable
transitive dependencies of the service are now available (installed and not administrativelydisabled
).
This method will be invoked only aftertransitiveDependencyUnavailable(ServiceController)
is called.- Parameters:
controller
- the controller
-
-