Search in sources :

Example 41 with GenericFutureListener

use of io.netty.util.concurrent.GenericFutureListener in project ratpack by ratpack.

the class RequestActionSupport method sendRequestBodyStream.

private void sendRequestBodyStream(Downstream<? super T> downstream, Channel channel, Publisher<? extends ByteBuf> publisher) {
    streamingBody = true;
    ((DefaultExecution) execution).delimit(downstream::error, continuation -> {
        continuation.resume(() -> {
            publisher.subscribe(new Subscriber<ByteBuf>() {

                private Subscription subscription;

                private final AtomicBoolean done = new AtomicBoolean();

                private long pending = requestConfig.content.getContentLength();

                private final GenericFutureListener<Future<? super Void>> cancelOnCloseListener = c -> cancel();

                private void cancel() {
                    subscription.cancel();
                    reset();
                }

                @Override
                public void onSubscribe(Subscription subscription) {
                    if (subscription == null) {
                        throw new NullPointerException("'subscription' is null");
                    }
                    if (this.subscription != null) {
                        subscription.cancel();
                        return;
                    }
                    this.subscription = subscription;
                    if (channel.isOpen()) {
                        channel.closeFuture().addListener(cancelOnCloseListener);
                        if (channel.isWritable()) {
                            this.subscription.request(1);
                        }
                        onWritabilityChanged = () -> {
                            if (channel.isWritable() && !done.get()) {
                                this.subscription.request(1);
                            }
                        };
                    } else {
                        cancel();
                    }
                }

                @Override
                public void onNext(ByteBuf o) {
                    o.touch();
                    if (!channel.isOpen()) {
                        o.release();
                        cancel();
                        return;
                    }
                    if (pending == 0) {
                        o.release();
                        subscription.request(1);
                        return;
                    }
                    int chunkSize = o.readableBytes();
                    if (pending > 0) {
                        if (chunkSize > pending) {
                            chunkSize = (int) pending;
                            o = o.slice(0, chunkSize);
                        }
                        pending = pending - chunkSize;
                    }
                    channel.write(new DefaultHttpContent(o));
                    if (channel.isWritable()) {
                        subscription.request(1);
                    } else {
                        channel.flush();
                    }
                }

                @Override
                public void onError(Throwable t) {
                    if (t == null) {
                        throw new NullPointerException("error is null");
                    }
                    reset();
                    forceDispose(channel.pipeline()).addListener(future -> {
                        if (!future.isSuccess()) {
                            t.addSuppressed(future.cause());
                        }
                        downstream.error(t);
                    });
                }

                @Override
                public void onComplete() {
                    if (done.compareAndSet(false, true)) {
                        if (pending > 0) {
                            reset();
                            forceDispose(channel.pipeline()).addListener(future -> {
                                Throwable t = new IllegalStateException("Publisher completed before sending advertised number of bytes");
                                if (!future.isSuccess()) {
                                    t.addSuppressed(future.cause());
                                }
                                downstream.error(t);
                            });
                        } else {
                            reset();
                            channel.writeAndFlush(LastHttpContent.EMPTY_LAST_CONTENT);
                        }
                    }
                }

                private void reset() {
                    if (done.compareAndSet(false, true)) {
                        onWritabilityChanged = NOOP_RUNNABLE;
                        channel.closeFuture().removeListener(cancelOnCloseListener);
                        streamingBody = false;
                    }
                }
            });
        });
    });
}
Also used : Execution(ratpack.exec.Execution) PrematureChannelClosureException(io.netty.handler.codec.PrematureChannelClosureException) SSLParameters(javax.net.ssl.SSLParameters) URISyntaxException(java.net.URISyntaxException) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Upstream(ratpack.exec.Upstream) ReceivedResponse(ratpack.core.http.client.ReceivedResponse) ratpack.core.http.internal(ratpack.core.http.internal) Unpooled(io.netty.buffer.Unpooled) SSLEngine(javax.net.ssl.SSLEngine) RequestSpec(ratpack.core.http.client.RequestSpec) HttpClientReadTimeoutException(ratpack.core.http.client.HttpClientReadTimeoutException) ByteBuf(io.netty.buffer.ByteBuf) ReadTimeoutException(io.netty.handler.timeout.ReadTimeoutException) io.netty.channel(io.netty.channel) URI(java.net.URI) Subscriber(org.reactivestreams.Subscriber) Downstream(ratpack.exec.Downstream) Function(ratpack.func.Function) SslContext(io.netty.handler.ssl.SslContext) ReadTimeoutHandler(io.netty.handler.timeout.ReadTimeoutHandler) Publisher(org.reactivestreams.Publisher) Headers(ratpack.core.http.Headers) GenericFutureListener(io.netty.util.concurrent.GenericFutureListener) DefaultExecution(ratpack.exec.internal.DefaultExecution) HostAndPort(com.google.common.net.HostAndPort) TimeUnit(java.util.concurrent.TimeUnit) io.netty.handler.codec.http(io.netty.handler.codec.http) SSLException(javax.net.ssl.SSLException) Status(ratpack.core.http.Status) SslHandler(io.netty.handler.ssl.SslHandler) Exceptions(ratpack.func.Exceptions) Action(ratpack.func.Action) Subscription(org.reactivestreams.Subscription) ChannelPool(io.netty.channel.pool.ChannelPool) SslContextBuilder(io.netty.handler.ssl.SslContextBuilder) Future(io.netty.util.concurrent.Future) DefaultExecution(ratpack.exec.internal.DefaultExecution) ByteBuf(io.netty.buffer.ByteBuf) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Future(io.netty.util.concurrent.Future) Subscription(org.reactivestreams.Subscription)

Example 42 with GenericFutureListener

use of io.netty.util.concurrent.GenericFutureListener in project cdap by caskdata.

the class AbstractSocksServerConnectHandler method handleConnectRequest.

/**
 * Handles the CONNECT socks request.
 *
 * @param ctx the context object for the channel
 * @param destAddress the destination address
 * @param destPort the destination port that the remote {@code localhost} is listening to
 * @param responseFunc a {@link Function} for creating a {@link SocksMessage} to send back to client
 *                     once the relay channel has been established
 */
private void handleConnectRequest(ChannelHandlerContext ctx, String destAddress, int destPort, Function<InetSocketAddress, SocksMessage> responseFunc, Supplier<SocksMessage> failureResponseSupplier) {
    // Create a forwarding channel handler, which returns a Future.
    // When that handler future completed successfully, responds with a Socks success response.
    // After the success response completed successfully, add the relay handler to the pipeline.
    Channel inboundChannel = ctx.channel();
    createForwardingChannelHandler(inboundChannel, destAddress, destPort).addListener((GenericFutureListener<Future<RelayChannelHandler>>) handlerFuture -> {
        if (handlerFuture.isSuccess()) {
            RelayChannelHandler handler = handlerFuture.get();
            SocketAddress relayAddress = handler.getRelayAddress();
            if (!(relayAddress instanceof InetSocketAddress)) {
                LOG.warn("Relay address is not InetSocketAddress: {} {}", relayAddress.getClass(), relayAddress);
                inboundChannel.writeAndFlush(failureResponseSupplier.get()).addListener(channelFuture -> Channels.closeOnFlush(inboundChannel));
            } else {
                inboundChannel.writeAndFlush(responseFunc.apply((InetSocketAddress) relayAddress)).addListener(channelFuture -> {
                    if (channelFuture.isSuccess()) {
                        ctx.pipeline().remove(AbstractSocksServerConnectHandler.this);
                        ctx.pipeline().addLast(handler);
                    } else {
                        Channels.closeOnFlush(inboundChannel);
                    }
                });
            }
        } else {
            Channels.closeOnFlush(inboundChannel);
        }
    });
}
Also used : SocketAddress(java.net.SocketAddress) Socks4CommandType(io.netty.handler.codec.socksx.v4.Socks4CommandType) LoggerFactory(org.slf4j.LoggerFactory) Loggers(io.cdap.cdap.common.logging.Loggers) Channels(io.cdap.cdap.common.http.Channels) Socks5CommandType(io.netty.handler.codec.socksx.v5.Socks5CommandType) DefaultSocks5CommandResponse(io.netty.handler.codec.socksx.v5.DefaultSocks5CommandResponse) Function(java.util.function.Function) Supplier(java.util.function.Supplier) Socks5CommandRequest(io.netty.handler.codec.socksx.v5.Socks5CommandRequest) ChannelHandlerContext(io.netty.channel.ChannelHandlerContext) Socks5CommandStatus(io.netty.handler.codec.socksx.v5.Socks5CommandStatus) ChannelFutureListener(io.netty.channel.ChannelFutureListener) Socks4CommandRequest(io.netty.handler.codec.socksx.v4.Socks4CommandRequest) Logger(org.slf4j.Logger) Socks5AddressType(io.netty.handler.codec.socksx.v5.Socks5AddressType) Socks4CommandStatus(io.netty.handler.codec.socksx.v4.Socks4CommandStatus) GenericFutureListener(io.netty.util.concurrent.GenericFutureListener) ChannelPipeline(io.netty.channel.ChannelPipeline) Inet4Address(java.net.Inet4Address) InetSocketAddress(java.net.InetSocketAddress) Channel(io.netty.channel.Channel) TimeUnit(java.util.concurrent.TimeUnit) DefaultSocks4CommandResponse(io.netty.handler.codec.socksx.v4.DefaultSocks4CommandResponse) SimpleChannelInboundHandler(io.netty.channel.SimpleChannelInboundHandler) LogSamplers(io.cdap.cdap.common.logging.LogSamplers) ChannelHandler(io.netty.channel.ChannelHandler) SocksMessage(io.netty.handler.codec.socksx.SocksMessage) Future(io.netty.util.concurrent.Future) InetSocketAddress(java.net.InetSocketAddress) Channel(io.netty.channel.Channel) Future(io.netty.util.concurrent.Future) SocketAddress(java.net.SocketAddress) InetSocketAddress(java.net.InetSocketAddress)

Example 43 with GenericFutureListener

use of io.netty.util.concurrent.GenericFutureListener in project pollen by MoonflowerTeam.

the class PollinatedFabricLoginChannel method processClient.

private CompletableFuture<@Nullable FriendlyByteBuf> processClient(Minecraft client, PacketListener listener, FriendlyByteBuf data, Consumer<GenericFutureListener<? extends Future<? super Void>>> listenerAdder) {
    CompletableFuture<FriendlyByteBuf> future = new CompletableFuture<>();
    NetworkRegistry.processMessage(this.deserialize(data, PollinatedPacketDirection.LOGIN_CLIENTBOUND), new PollinatedFabricLoginPacketContext(pkt -> {
        try {
            future.complete(this.serialize(pkt, PollinatedPacketDirection.LOGIN_SERVERBOUND));
        } catch (Throwable t) {
            t.printStackTrace();
            future.completeExceptionally(t);
        }
    }, listener.getConnection(), __ -> {
    }, PollinatedPacketDirection.LOGIN_CLIENTBOUND), this.clientMessageHandler.get().get());
    return future;
}
Also used : FriendlyByteBuf(net.minecraft.network.FriendlyByteBuf) FabricLoader(net.fabricmc.loader.api.FabricLoader) ResourceLocation(net.minecraft.resources.ResourceLocation) PollinatedLoginNetworkChannel(gg.moonflower.pollen.api.network.PollinatedLoginNetworkChannel) PacketSender(net.fabricmc.fabric.api.networking.v1.PacketSender) NetworkRegistry(gg.moonflower.pollen.api.registry.NetworkRegistry) PollinatedLoginPacket(gg.moonflower.pollen.api.network.packet.login.PollinatedLoginPacket) CompletableFuture(java.util.concurrent.CompletableFuture) FriendlyByteBuf(net.minecraft.network.FriendlyByteBuf) Function(java.util.function.Function) Supplier(java.util.function.Supplier) ArrayList(java.util.ArrayList) PacketDeserializer(gg.moonflower.pollen.api.network.PacketDeserializer) MinecraftServer(net.minecraft.server.MinecraftServer) Pair(org.apache.commons.lang3.tuple.Pair) Minecraft(net.minecraft.client.Minecraft) EnvType(net.fabricmc.api.EnvType) ClientboundCustomQueryPacketAccessor(gg.moonflower.pollen.core.mixin.client.ClientboundCustomQueryPacketAccessor) ClientLoginNetworking(net.fabricmc.fabric.api.client.networking.v1.ClientLoginNetworking) ApiStatus(org.jetbrains.annotations.ApiStatus) PollinatedPacket(gg.moonflower.pollen.api.network.packet.PollinatedPacket) ServerLoginPacketListenerImplExtension(gg.moonflower.pollen.core.extensions.fabric.ServerLoginPacketListenerImplExtension) ClientPlayNetworking(net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking) PollinatedFabricLoginPacketContext(gg.moonflower.pollen.api.network.fabric.context.PollinatedFabricLoginPacketContext) PacketListener(net.minecraft.network.PacketListener) ServerboundCustomQueryPacket(net.minecraft.network.protocol.login.ServerboundCustomQueryPacket) GenericFutureListener(io.netty.util.concurrent.GenericFutureListener) PollinatedPacketDirection(gg.moonflower.pollen.api.network.packet.PollinatedPacketDirection) ServerLoginConnectionEvents(net.fabricmc.fabric.api.networking.v1.ServerLoginConnectionEvents) PollinatedFabricPacketContext(gg.moonflower.pollen.api.network.fabric.context.PollinatedFabricPacketContext) Consumer(java.util.function.Consumer) Nullable(org.jetbrains.annotations.Nullable) List(java.util.List) ServerPlayNetworking(net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking) Packet(net.minecraft.network.protocol.Packet) Future(io.netty.util.concurrent.Future) ServerLoginNetworking(net.fabricmc.fabric.api.networking.v1.ServerLoginNetworking) ClientboundCustomQueryPacket(net.minecraft.network.protocol.login.ClientboundCustomQueryPacket) CompletableFuture(java.util.concurrent.CompletableFuture) PollinatedFabricLoginPacketContext(gg.moonflower.pollen.api.network.fabric.context.PollinatedFabricLoginPacketContext)

Example 44 with GenericFutureListener

use of io.netty.util.concurrent.GenericFutureListener in project flink by splunk.

the class HandlerUtils method transferFile.

public static void transferFile(ChannelHandlerContext ctx, File file, HttpRequest httpRequest) throws FlinkException {
    final RandomAccessFile randomAccessFile;
    try {
        randomAccessFile = new RandomAccessFile(file, "r");
    } catch (FileNotFoundException e) {
        throw new FlinkException("Can not find file " + file + ".", e);
    }
    try {
        final long fileLength = randomAccessFile.length();
        final FileChannel fileChannel = randomAccessFile.getChannel();
        try {
            HttpResponse response = new DefaultHttpResponse(HTTP_1_1, OK);
            response.headers().set(CONTENT_TYPE, "text/plain");
            if (HttpHeaders.isKeepAlive(httpRequest)) {
                response.headers().set(CONNECTION, HttpHeaders.Values.KEEP_ALIVE);
            }
            HttpHeaders.setContentLength(response, fileLength);
            // write the initial line and the header.
            ctx.write(response);
            // write the content.
            final ChannelFuture lastContentFuture;
            final GenericFutureListener<Future<? super Void>> completionListener = future -> {
                fileChannel.close();
                randomAccessFile.close();
            };
            if (ctx.pipeline().get(SslHandler.class) == null) {
                ctx.write(new DefaultFileRegion(fileChannel, 0, fileLength), ctx.newProgressivePromise()).addListener(completionListener);
                lastContentFuture = ctx.writeAndFlush(LastHttpContent.EMPTY_LAST_CONTENT);
            } else {
                lastContentFuture = ctx.writeAndFlush(new HttpChunkedInput(new ChunkedFile(randomAccessFile, 0, fileLength, 8192)), ctx.newProgressivePromise()).addListener(completionListener);
            // HttpChunkedInput will write the end marker (LastHttpContent) for us.
            }
            // close the connection, if no keep-alive is needed
            if (!HttpHeaders.isKeepAlive(httpRequest)) {
                lastContentFuture.addListener(ChannelFutureListener.CLOSE);
            }
        } catch (IOException ex) {
            fileChannel.close();
            throw ex;
        }
    } catch (IOException ioe) {
        try {
            randomAccessFile.close();
        } catch (IOException e) {
            throw new FlinkException("Close file or channel error.", e);
        }
        throw new FlinkException("Could not transfer file " + file + " to the client.", ioe);
    }
}
Also used : ChannelFuture(org.apache.flink.shaded.netty4.io.netty.channel.ChannelFuture) RestMapperUtils(org.apache.flink.runtime.rest.util.RestMapperUtils) FlinkException(org.apache.flink.util.FlinkException) RandomAccessFile(java.io.RandomAccessFile) ChannelFutureListener(org.apache.flink.shaded.netty4.io.netty.channel.ChannelFutureListener) OK(org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpResponseStatus.OK) LastHttpContent(org.apache.flink.shaded.netty4.io.netty.handler.codec.http.LastHttpContent) LoggerFactory(org.slf4j.LoggerFactory) CompletableFuture(java.util.concurrent.CompletableFuture) Future(org.apache.flink.shaded.netty4.io.netty.util.concurrent.Future) HTTP_1_1(org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpVersion.HTTP_1_1) DefaultHttpResponse(org.apache.flink.shaded.netty4.io.netty.handler.codec.http.DefaultHttpResponse) HttpResponseStatus(org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpResponseStatus) DefaultFileRegion(org.apache.flink.shaded.netty4.io.netty.channel.DefaultFileRegion) HttpResponse(org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpResponse) HttpHeaders(org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpHeaders) ObjectMapper(org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper) Map(java.util.Map) ConfigConstants(org.apache.flink.configuration.ConfigConstants) HttpRequest(org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpRequest) CONNECTION(org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpHeaders.Names.CONNECTION) Nonnull(javax.annotation.Nonnull) ChannelFuture(org.apache.flink.shaded.netty4.io.netty.channel.ChannelFuture) ErrorResponseBody(org.apache.flink.runtime.rest.messages.ErrorResponseBody) ChannelHandlerContext(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext) CONTENT_TYPE(org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpHeaders.Names.CONTENT_TYPE) HttpChunkedInput(org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpChunkedInput) Logger(org.slf4j.Logger) RestConstants(org.apache.flink.runtime.rest.util.RestConstants) GenericFutureListener(org.apache.flink.shaded.netty4.io.netty.util.concurrent.GenericFutureListener) StringWriter(java.io.StringWriter) Unpooled(org.apache.flink.shaded.netty4.io.netty.buffer.Unpooled) IOException(java.io.IOException) ByteBuf(org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf) SslHandler(org.apache.flink.shaded.netty4.io.netty.handler.ssl.SslHandler) File(java.io.File) FileNotFoundException(java.io.FileNotFoundException) ResponseBody(org.apache.flink.runtime.rest.messages.ResponseBody) ChunkedFile(org.apache.flink.shaded.netty4.io.netty.handler.stream.ChunkedFile) FileChannel(java.nio.channels.FileChannel) FileChannel(java.nio.channels.FileChannel) ChunkedFile(org.apache.flink.shaded.netty4.io.netty.handler.stream.ChunkedFile) FileNotFoundException(java.io.FileNotFoundException) DefaultHttpResponse(org.apache.flink.shaded.netty4.io.netty.handler.codec.http.DefaultHttpResponse) HttpResponse(org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpResponse) IOException(java.io.IOException) DefaultFileRegion(org.apache.flink.shaded.netty4.io.netty.channel.DefaultFileRegion) FlinkException(org.apache.flink.util.FlinkException) SslHandler(org.apache.flink.shaded.netty4.io.netty.handler.ssl.SslHandler) HttpChunkedInput(org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpChunkedInput) RandomAccessFile(java.io.RandomAccessFile) DefaultHttpResponse(org.apache.flink.shaded.netty4.io.netty.handler.codec.http.DefaultHttpResponse) CompletableFuture(java.util.concurrent.CompletableFuture) Future(org.apache.flink.shaded.netty4.io.netty.util.concurrent.Future) ChannelFuture(org.apache.flink.shaded.netty4.io.netty.channel.ChannelFuture)

Example 45 with GenericFutureListener

use of io.netty.util.concurrent.GenericFutureListener in project aws-sdk-java-v2 by aws.

the class MultiplexedChannelRecord method acquireClaimedStream.

void acquireClaimedStream(Promise<Channel> promise) {
    doInEventLoop(connection.eventLoop(), () -> {
        if (state != RecordState.OPEN) {
            String message;
            // GOAWAY
            if (state == RecordState.CLOSED_TO_NEW) {
                message = String.format("Connection %s received GOAWAY with Last Stream ID %d. Unable to open new " + "streams on this connection.", connection, lastStreamId);
            } else {
                message = String.format("Connection %s was closed while acquiring new stream.", connection);
            }
            log.warn(connection, () -> message);
            promise.setFailure(new IOException(message));
            return;
        }
        Future<Http2StreamChannel> streamFuture = new Http2StreamChannelBootstrap(connection).open();
        streamFuture.addListener((GenericFutureListener<Future<Http2StreamChannel>>) future -> {
            warnIfNotInEventLoop(connection.eventLoop());
            if (!future.isSuccess()) {
                promise.setFailure(future.cause());
                return;
            }
            Http2StreamChannel channel = future.getNow();
            channel.pipeline().addLast(UnusedChannelExceptionHandler.getInstance());
            channel.attr(ChannelAttributeKey.HTTP2_FRAME_STREAM).set(channel.stream());
            channel.attr(ChannelAttributeKey.CHANNEL_DIAGNOSTICS).set(new ChannelDiagnostics(channel));
            childChannels.put(channel.id(), channel);
            promise.setSuccess(channel);
            if (closeIfIdleTask == null && allowedIdleConnectionTimeMillis != null) {
                enableCloseIfIdleTask();
            }
        });
    }, promise);
}
Also used : ScheduledFuture(io.netty.util.concurrent.ScheduledFuture) ChannelAttributeKey(software.amazon.awssdk.http.nio.netty.internal.ChannelAttributeKey) ChannelId(io.netty.channel.ChannelId) NettyUtils.warnIfNotInEventLoop(software.amazon.awssdk.http.nio.netty.internal.utils.NettyUtils.warnIfNotInEventLoop) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) NettyUtils.doInEventLoop(software.amazon.awssdk.http.nio.netty.internal.utils.NettyUtils.doInEventLoop) Http2GoAwayFrame(io.netty.handler.codec.http2.Http2GoAwayFrame) ArrayList(java.util.ArrayList) Http2StreamChannelBootstrap(io.netty.handler.codec.http2.Http2StreamChannelBootstrap) Duration(java.time.Duration) Map(java.util.Map) ChannelDiagnostics(software.amazon.awssdk.http.nio.netty.internal.ChannelDiagnostics) Promise(io.netty.util.concurrent.Promise) GenericFutureListener(io.netty.util.concurrent.GenericFutureListener) IOException(java.io.IOException) UnusedChannelExceptionHandler(software.amazon.awssdk.http.nio.netty.internal.UnusedChannelExceptionHandler) NettyClientLogger(software.amazon.awssdk.http.nio.netty.internal.utils.NettyClientLogger) Channel(io.netty.channel.Channel) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) AtomicLong(java.util.concurrent.atomic.AtomicLong) List(java.util.List) ChannelOutboundInvoker(io.netty.channel.ChannelOutboundInvoker) SdkInternalApi(software.amazon.awssdk.annotations.SdkInternalApi) Http2StreamChannel(io.netty.handler.codec.http2.Http2StreamChannel) Future(io.netty.util.concurrent.Future) Http2StreamChannelBootstrap(io.netty.handler.codec.http2.Http2StreamChannelBootstrap) ScheduledFuture(io.netty.util.concurrent.ScheduledFuture) CompletableFuture(java.util.concurrent.CompletableFuture) Future(io.netty.util.concurrent.Future) IOException(java.io.IOException) ChannelDiagnostics(software.amazon.awssdk.http.nio.netty.internal.ChannelDiagnostics) Http2StreamChannel(io.netty.handler.codec.http2.Http2StreamChannel)

Aggregations

GenericFutureListener (io.netty.util.concurrent.GenericFutureListener)70 Future (io.netty.util.concurrent.Future)44 ChannelFuture (io.netty.channel.ChannelFuture)32 Channel (io.netty.channel.Channel)19 ChannelHandlerContext (io.netty.channel.ChannelHandlerContext)18 IOException (java.io.IOException)18 List (java.util.List)15 InetSocketAddress (java.net.InetSocketAddress)13 ArrayList (java.util.ArrayList)13 Map (java.util.Map)12 ChannelOption (io.netty.channel.ChannelOption)10 Future (io.vertx.core.Future)10 Handler (io.vertx.core.Handler)10 ContextInternal (io.vertx.core.impl.ContextInternal)10 VertxInternal (io.vertx.core.impl.VertxInternal)10 Logger (org.slf4j.Logger)10 LoggerFactory (org.slf4j.LoggerFactory)9 Bootstrap (io.netty.bootstrap.Bootstrap)8 LoggingHandler (io.netty.handler.logging.LoggingHandler)8 AsyncResult (io.vertx.core.AsyncResult)8