Package 

Class LifecycleOnDestroyHelper

    • Method Summary

      Modifier and Type Method Description
      static void shutdownUponDestruction(Lifecycle lifecycle, ManagedChannel channel) Arranges for shutdownNow to be called on {@code channel} just before {@code lifecycle} is destroyed, or immediately if {@code lifecycle} is already destroyed.
      static void shutdownUponDestruction(Lifecycle lifecycle, Server server) Arranges for shutdownNow to be called on {@code server} just before {@code * lifecycle} is destroyed, or immediately if {@code lifecycle} is already destroyed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • shutdownUponDestruction

        @MainThread() static void shutdownUponDestruction(Lifecycle lifecycle, ManagedChannel channel)

        Arranges for shutdownNow to be called on {@code channel} just before {@code lifecycle} is destroyed, or immediately if {@code lifecycle} is already destroyed.

        Must only be called on the application's main thread.

      • shutdownUponDestruction

        @MainThread() static void shutdownUponDestruction(Lifecycle lifecycle, Server server)

        Arranges for shutdownNow to be called on {@code server} just before {@code * lifecycle} is destroyed, or immediately if {@code lifecycle} is already destroyed.

        Must only be called on the application's main thread.