Interface GracefulShutdownListener


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 Type
    Method
    Description
    void
    Invoked when the transport is being shutdown forcefully.
    void
    Invoked when an attempt is made to shutdown the transport gracefully.
  • Method Details

    • shutdownRequested

      void shutdownRequested(ShutdownContext shutdownContext)
      Invoked when an attempt is made to shutdown the transport gracefully.
      Parameters:
      shutdownContext - the ShutdownContext for 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.