public interface GracefulShutdownListener
Interface to notify interested parties that a
Transport is being shutdown.
Keep in mind that there is no guarantee that all listeners will be invoked before the transport is terminated (e.g.,
timed graceful shutdown or a graceful shutdown() that was initiated and then shutdownNow() is later invoked.- Since:
- 2.3.5.
-
Method Summary
Modifier and TypeMethodDescriptionvoidInvoked when the transport is being shutdown forcefully.voidshutdownRequested(ShutdownContext shutdownContext) Invoked when an attempt is made to shutdown the transport gracefully.
-
Method Details
-
shutdownRequested
Invoked when an attempt is made to shutdown the transport gracefully.- Parameters:
shutdownContext- theShutdownContextfor this shutdown request.
-
shutdownForced
void shutdownForced()Invoked when the transport is being shutdown forcefully. This means either shutdownNow() was invoked or the graceful shutdown timed out. It's important that the implementation of this method not block.
-