public static AsyncCloseableSupport of(Consumer<CompletableFuture<?>> closeAction) {
        return new AsyncCloseableSupport(requireNonNull(closeAction, "closeAction"));
    }
Returns a new {@link AsyncCloseableSupport} which calls the specified {@link Consumer} on
{@link #close()} or {@link #closeAsync()}.
<pre>{@code
> class MyClass implements ListenableAsyncCloseable {
>     final AsyncCloseableSupport closeable = AsyncCloseableSupport.of(f -> {
>         // Release resources here.
>         ...
>         f.complete(null);
>     });
>
>     @Override
>     public boolean isClosing() { return closeable.isClosing(); }
>
>     @Override
>     public CompletableFuture<?> whenClosed() { return closeable.whenClosed(); }
>
>     @Override
>     public CompletableFuture<?> closeAsync() { return closeable.closeAsync(); }
>
>     @Override
>     public void close() { closeable.close(); }
> }
}</pre>

@param closeAction the {@link Consumer} which performs the task that release the resources and
                   completes the given {@link CompletableFuture}.
core/src/main/java/com/linecorp/armeria/common/util/AsyncCloseableSupport.java