Package io.netty.channel

Examples of io.netty.channel.DefaultChannelPromise


        try {
            init(channel);
        } catch (Throwable t) {
            channel.unsafe().closeForcibly();
            // as the Channel is not registered yet we need to force the usage of the GlobalEventExecutor
            return new DefaultChannelPromise(channel, GlobalEventExecutor.INSTANCE).setFailure(t);
        }

        ChannelFuture regFuture = group().register(channel);
        if (regFuture.cause() != null) {
            if (channel.isRegistered()) {
View Full Code Here


        this(new LocalChannel());
    }

    public NoOpChannelHandlerContext(Channel channel) {
        this.channel = channel;
        completedPromise = new DefaultChannelPromise(this.channel, executor());
        completedPromise.setSuccess();
    }
View Full Code Here

        return UnpooledByteBufAllocator.DEFAULT;
    }

    @Override
    public ChannelPromise newPromise() {
        return new DefaultChannelPromise(channel, executor());
    }
View Full Code Here

            @Override
            public <T> Attribute<T> attr(AttributeKey<T> key) {
                return attributeMap.attr(key);
            }
        };
        failedPromise = new DefaultChannelPromise(channel, executor());
        failedPromise.setFailure(new OperationNotSupportedException());
    }
View Full Code Here

        return false;
    }

    @Override
    public ChannelFuture register(Channel channel) {
        return register(channel, new DefaultChannelPromise(channel, this));
    }
View Full Code Here

        return false;
    }

    @Override
    public ChannelFuture register(Channel channel) {
        return register(channel, new DefaultChannelPromise(channel, this));
    }
View Full Code Here

        if (lastChunk && !keepAlive) {
            shutDown();
        }

        if (future == null) {
            DefaultChannelPromise doneFuture = new DefaultChannelPromise(channel);
            doneFuture.setSuccess();
            future = doneFuture;
        }
        return new NettyHttpFuture(future);
    }
View Full Code Here

        return this;
    }

    @Override
    public ChannelFuture bind(SocketAddress localAddress) {
        DefaultChannelPromise promise = new DefaultChannelPromise(channel);
        promise.setSuccess();
        return promise;
    }
View Full Code Here

        return promise;
    }

    @Override
    public ChannelFuture connect(SocketAddress remoteAddress) {
        DefaultChannelPromise promise = new DefaultChannelPromise(channel);
        promise.setSuccess();
        return promise;
    }
View Full Code Here

        return promise;
    }

    @Override
    public ChannelFuture connect(SocketAddress remoteAddress, SocketAddress localAddress) {
        DefaultChannelPromise promise = new DefaultChannelPromise(channel);
        promise.setSuccess();
        return promise;
    }
View Full Code Here

TOP

Related Classes of io.netty.channel.DefaultChannelPromise

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.