Class Service.Listener
java.lang.Object
com.google.common.util.concurrent.Service.Listener
- Enclosing interface:
Service
Deprecated.
The Google Guava Core Libraries are deprecated and will not be part of the AEM SDK after April 2023
A listener for the various state changes that a
Service goes through in its lifecycle.
All methods are no-ops by default, implementors should override the ones they care about.
- Since:
- 15.0 (present as an interface in 13.0)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfailed(Service.State from, Throwable failure) Deprecated.Called when the service transitions to the FAILED state.voidrunning()voidstarting()voidstopping(Service.State from) Deprecated.Called when the service transitions to the STOPPING state.voidterminated(Service.State from) Deprecated.Called when the service transitions to the TERMINATED state.
-
Constructor Details
-
Listener
public Listener()Deprecated.
-
-
Method Details
-
starting
public void starting()Deprecated.Called when the service transitions from NEW to STARTING. This occurs whenService.start()orService.startAndWait()is called the first time. -
running
public void running()Deprecated. -
stopping
Deprecated.Called when the service transitions to the STOPPING state. The only valid values forfromare STARTING or RUNNING. This occurs whenService.stop()is called.- Parameters:
from- The previous state that is being transitioned from.
-
terminated
Deprecated.Called when the service transitions to the TERMINATED state. The TERMINATED state is a terminal state in the transition diagram. Therefore, if this method is called, no other methods will be called on theService.Listener. -
failed
Deprecated.Called when the service transitions to the FAILED state. The FAILED state is a terminal state in the transition diagram. Therefore, if this method is called, no other methods will be called on theService.Listener.- Parameters:
from- The previous state that is being transitioned from. Failure can occur in any state with the exception of NEW or TERMINATED.failure- The exception that caused the failure.
-