shutDownHookAction

fun shutDownHookAction(service: Service): Thread

Creates a JVM shutdown hook Thread that gracefully stops the given Service.

Return

A Thread suitable for use with Runtime.addShutdownHook.

Parameters

service

The Guava Service to stop when the JVM shuts down.