From 9659d28f1083f8ce9c67db3fb708f5b96740fba4 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Wed, 7 Mar 2018 14:51:18 +0100 Subject: Move shutdown hook registration to dedicated provider This change would allow using ShutdownHandlerImpl in integration tests. Change-Id: I854f65d03b9e1a495fda7211fd1b7fd51b4e5ba3 Signed-off-by: Marek Gradzki --- .../src/main/java/io/fd/honeycomb/data/init/ShutdownHandler.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'infra/cfg-init/src') diff --git a/infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/ShutdownHandler.java b/infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/ShutdownHandler.java index fc350da6e..6a0096e1e 100644 --- a/infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/ShutdownHandler.java +++ b/infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/ShutdownHandler.java @@ -19,15 +19,20 @@ package io.fd.honeycomb.data.init; import javax.annotation.Nonnull; /** - * Handles closing of closeable components + * Handles closing of closeable components. */ public interface ShutdownHandler { /** - * Register component to be properly closed on shutdown + * Registers component to be properly closed on shutdown. * * @param name component name * @param component closeable component */ void register(@Nonnull final String name, @Nonnull final AutoCloseable component); + + /** + * Performs shutdown for all registered components. + */ + void performShutdown(); } -- cgit 1.2.3-korg