Interface ServerQuiesceListener
public interface ServerQuiesceListener
A server quiesce listener. All
ServerQuiesceListener
s registered
in the service registry are called when the server has been stopped without
the --force
option.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called when the server is stopped without the--force
option to allow the registered service to perform pre-stop quiesce activities to facilitate a clean server stop, like canceling pending scheduled executors, or stopping inbound traffic to the server.
-
Method Details
-
serverStopping
void serverStopping()Called when the server is stopped without the--force
option to allow the registered service to perform pre-stop quiesce activities to facilitate a clean server stop, like canceling pending scheduled executors, or stopping inbound traffic to the server. This method should not be used to register any new services, nor should it prematurely remove services that other services depend on.This method must complete and return to its caller in a timely manner and can be called concurrently with other
ServerQuiesceListener
s in no specific order.Note that when this method is called,
FrameworkState.isStopping()
will return true, andFrameworkState.isValid()
will return false.
-