package io.dropwizard.lifecycle;

public class AutoCloseableManager implements Managed {

    private final AutoCloseable autoCloseable;

    public AutoCloseableManager(final AutoCloseable autoCloseable) {
        this.autoCloseable = autoCloseable;
    }

    @Override
    public void start() throws Exception {
        // OK BOSS
    }

    @Override
    public void stop() throws Exception {
        this.autoCloseable.close();
    }
}

@@ -27,16 +27,650 @@
 cycle;%0A%0A
+/**%0A * An implementation of the Managed Interface for %7B@link AutoCloseable%7D instances. Adding an%0A * %7B@code AutoCloseableManager%7D instance to the application's environment ties that object%E2%80%99s lifecycle to%0A * that of the application%E2%80%99s HTTP server. After the server has stopped (and after its graceful%0A * shutdown period) the %7B@link #stop()%7D method is called, which will trigger the call to %7B@link%0A * AutoCloseable#close()%7D%0A *%0A * %3Cp%3EUsage :%3C/p%3E%0A * %3Cpre%3E%0A * %7B@code%0A * AutoCloseable client = ...;%0A * AutoCloseableManager clientManager = new AutoCloseableManager(client);%0A * environment.lifecycle().manage(clientManager);%0A * %7D%0A * %3C/pre%3E%0A */%0A
 public c
@@ -765,16 +765,106 @@
 eable;%0A%0A
+    /**%0A     * @param autoCloseable instance to close when the HTTP server stops.%0A     */%0A
     publ
@@ -967,32 +967,109 @@
 oseable;%0A    %7D%0A%0A
+    /**%0A     * The start operation does nothing (i.e. it's a no-op).%0A     */%0A
     @Override%0A  
@@ -1117,29 +1117,209 @@
     
+%7D%0A%0A
     /
-/ OK BOSS%0A    %7D%0A
+**%0A     * Calls %7B@link AutoCloseable#close()%7D given in the %7B@link AutoCloseableManager(AutoCloseable)%7D%0A     *%0A     * @throws Exception propagates %7B@link AutoCloseable#close()%7D exception%0A     */
 %0A   

Add JavaDoc to AutoCloseableManager