Defines helpers for implementing graceful shutdown of a java application.