public static CompletionHandler wrap(final Iterable<CompletionHandler> handlers) {
        return new CompletionHandler() {

            @Override
            public void completed() {
                for (CompletionHandler handler : handlers) {
                    tryComplete(handler);
                }
            }

            @Override
            public void failed(Throwable t) {
                for (CompletionHandler handler : handlers) {
                    tryFail(handler, t);
                }
            }
        };
    }
Various utilities for {@link CompletionHandler}.

@author Simon Thoresen Hult
@author bjorncs
container-core/src/main/java/com/yahoo/jdisc/http/server/jetty/CompletionHandlers.java