io.netty.util.concurrent.GenericProgressiveFutureListener Java Examples

The following examples show how to use io.netty.util.concurrent.GenericProgressiveFutureListener. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RequestContextAwareProgressiveFutureListener.java    From armeria with Apache License 2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
static <T extends ProgressiveFuture<?>> GenericProgressiveFutureListener<T> of(
        RequestContext ctx, GenericProgressiveFutureListener listener) {
    requireNonNull(ctx, "ctx");
    requireNonNull(listener, "listener");
    return new RequestContextAwareProgressiveFutureListener(ctx, listener);
}
 
Example #2
Source File: RequestContextAwareFutureListener.java    From armeria with Apache License 2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
static <T extends Future<?>> GenericFutureListener<T> of(
        RequestContext ctx, GenericFutureListener listener) {

    if (listener instanceof GenericProgressiveFutureListener) {
        return (GenericFutureListener) RequestContextAwareProgressiveFutureListener.of(
                ctx, (GenericProgressiveFutureListener) listener);
    }

    return new RequestContextAwareFutureListener(ctx, listener);
}
 
Example #3
Source File: RequestContextAwareProgressiveFutureListener.java    From armeria with Apache License 2.0 4 votes vote down vote up
private RequestContextAwareProgressiveFutureListener(RequestContext ctx,
                                                     GenericProgressiveFutureListener listener) {
    this.ctx = ctx;
    this.listener = listener;
}