qbit/core/src/main/java/io/advantageous/qbit/reactive/Reactor.java
public <T> Callback<T> wrapCallbackWithTimeout(
            final String operationDescription,
            final Callback<T> callback,
            final Logger logger,
            final TimeUnit timeUnit,
            final long timeoutDuration) {
        return callbackBuilder().setCallback(new Callback<T>() {
            @Override
            public void accept(T t) {
                if (logger.isDebugEnabled()) {
                    logger.debug("{} returned {}", operationDescription, t);
                }
                callback.resolve(t);
            }
        }).setOnError(error -> {
            logger.error(String.format("ERROR calling %s", operationDescription), error);
            callback.onError(error);

        }).setOnTimeout(() -> {
            logger.error("TIMEOUT calling {}", operationDescription);
            callback.onTimeout();
        }).setTimeoutTimeUnit(timeUnit).setTimeoutDuration(timeoutDuration)
                .build();
    }
public <T> Callback<T> wrapCallbackWithTimeout(
            final String operationDescription,
            final Callback<T> callback,
            final Logger logger,
            final TimeUnit timeUnit,
            final long timeoutDuration) {
        return callbackBuilder().setCallback(new Callback<T>() {
            @Override
            public void accept(T t) {
                if (logger.isDebugEnabled()) {
                    logger.debug("{} returned {}", operationDescription, t);
                }
                callback.resolve(t);
            }
        }).setOnError(error -> {
            logger.error(String.format("ERROR calling %s", operationDescription), error);
            callback.onError(error);

        }).setOnTimeout(() -> {
            logger.error("TIMEOUT calling {}", operationDescription);
            callback.onTimeout();
        }).setTimeoutTimeUnit(timeUnit).setTimeoutDuration(timeoutDuration)
                .build();
    }
Used for quickly delegating one callback to another.
This allows one liners so you don't have to create a builder for this common case.

@param operationDescription Describe the operation for logging
@param callback             callback to delegate error and timeouts too.
@param logger               logger to log errors and timeouts.
@param <T>                  Generic type
@param timeoutDuration      time out duration
@param timeUnit             Time Unit
@return wrapped callback that is tied to this reactor.