Example usage for io.netty.channel ChannelProgressivePromise channel

List of usage examples for io.netty.channel ChannelProgressivePromise channel

Introduction

In this page you can find the example usage for io.netty.channel ChannelProgressivePromise channel.

Prototype

Channel channel();

Source Link

Document

Returns a channel where the I/O operation associated with this future takes place.

Usage

From source file:com.addthis.hydra.data.query.op.OpGroupBy.java

License:Apache License

/**
 * Generate new promise for the child operation.
 *
 * @param opPromise promise of the 'groupby' query operation
 *
 * @return generated promise/*from www .  j a v a 2 s. c o  m*/
 */
private ChannelProgressivePromise generateNewPromise(ChannelProgressivePromise opPromise) {
    final ChannelProgressivePromise result;
    if (opPromise.channel() == null) {
        result = new DefaultChannelProgressivePromise(null, ImmediateEventExecutor.INSTANCE);
    } else {
        result = opPromise.channel().newProgressivePromise();
    }
    result.addListener(errorForwarder);
    return result;
}