Search in sources :

Example 6 with HttpServerRequest

use of io.vertx.core.http.HttpServerRequest in project vert.x by eclipse.

the class HttpRequestStreamTest method testReadStreamPauseResume.

@Test
public void testReadStreamPauseResume() {
    String path = "/some/path";
    this.server = vertx.createHttpServer(new HttpServerOptions().setAcceptBacklog(10).setPort(HttpTestBase.DEFAULT_HTTP_PORT));
    ReadStream<HttpServerRequest> httpStream = server.requestStream();
    AtomicBoolean paused = new AtomicBoolean();
    httpStream.handler(req -> {
        assertFalse(paused.get());
        HttpServerResponse response = req.response();
        response.setStatusCode(200).end();
        response.close();
    });
    server.listen(listenAR -> {
        assertTrue(listenAR.succeeded());
        paused.set(true);
        httpStream.pause();
        netClient = vertx.createNetClient(new NetClientOptions().setConnectTimeout(1000));
        netClient.connect(HttpTestBase.DEFAULT_HTTP_PORT, "localhost", socketAR -> {
            assertTrue(socketAR.succeeded());
            NetSocket socket = socketAR.result();
            Buffer buffer = Buffer.buffer();
            socket.handler(buffer::appendBuffer);
            socket.closeHandler(v -> {
                assertEquals(0, buffer.length());
                paused.set(false);
                httpStream.resume();
                client = vertx.createHttpClient(new HttpClientOptions());
                client.request(HttpMethod.GET, HttpTestBase.DEFAULT_HTTP_PORT, "localhost", path, resp -> {
                    assertEquals(200, resp.statusCode());
                    testComplete();
                }).end();
            });
        });
    });
    await();
}
Also used : NetSocket(io.vertx.core.net.NetSocket) Buffer(io.vertx.core.buffer.Buffer) HttpServerRequest(io.vertx.core.http.HttpServerRequest) HttpServer(io.vertx.core.http.HttpServer) Vertx(io.vertx.core.Vertx) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Test(org.junit.Test) NetClientOptions(io.vertx.core.net.NetClientOptions) CountDownLatch(java.util.concurrent.CountDownLatch) Buffer(io.vertx.core.buffer.Buffer) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) HttpMethod(io.vertx.core.http.HttpMethod) HttpServerResponse(io.vertx.core.http.HttpServerResponse) ReadStream(io.vertx.core.streams.ReadStream) HttpServerOptions(io.vertx.core.http.HttpServerOptions) HttpClientOptions(io.vertx.core.http.HttpClientOptions) NetClient(io.vertx.core.net.NetClient) HttpClient(io.vertx.core.http.HttpClient) NetSocket(io.vertx.core.net.NetSocket) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) NetClientOptions(io.vertx.core.net.NetClientOptions) HttpServerRequest(io.vertx.core.http.HttpServerRequest) HttpServerResponse(io.vertx.core.http.HttpServerResponse) HttpServerOptions(io.vertx.core.http.HttpServerOptions) HttpClientOptions(io.vertx.core.http.HttpClientOptions) Test(org.junit.Test)

Example 7 with HttpServerRequest

use of io.vertx.core.http.HttpServerRequest in project vert.x by eclipse.

the class HttpRequestStreamTest method testCloseServerAsynchronously.

@Test
public void testCloseServerAsynchronously() {
    this.server = vertx.createHttpServer(new HttpServerOptions().setPort(HttpTestBase.DEFAULT_HTTP_PORT));
    AtomicInteger done = new AtomicInteger();
    ReadStream<HttpServerRequest> stream = server.requestStream();
    stream.handler(req -> {
    });
    ThreadLocal<Object> stack = new ThreadLocal<>();
    stack.set(true);
    stream.endHandler(v -> {
        assertTrue(Vertx.currentContext().isEventLoopContext());
        assertNull(stack.get());
        if (done.incrementAndGet() == 2) {
            testComplete();
        }
    });
    server.listen(ar -> {
        assertTrue(Vertx.currentContext().isEventLoopContext());
        assertNull(stack.get());
        ThreadLocal<Object> stack2 = new ThreadLocal<>();
        stack2.set(true);
        server.close(v -> {
            assertTrue(Vertx.currentContext().isEventLoopContext());
            assertNull(stack2.get());
            if (done.incrementAndGet() == 2) {
                testComplete();
            }
        });
        stack2.set(null);
    });
    await();
}
Also used : AtomicInteger(java.util.concurrent.atomic.AtomicInteger) HttpServerRequest(io.vertx.core.http.HttpServerRequest) HttpServerOptions(io.vertx.core.http.HttpServerOptions) Test(org.junit.Test)

Example 8 with HttpServerRequest

use of io.vertx.core.http.HttpServerRequest in project vert.x by eclipse.

the class Http2ServerTest method testServerSendGoAwayInteralError.

@Test
public void testServerSendGoAwayInteralError() throws Exception {
    waitFor(3);
    AtomicReference<HttpServerRequest> first = new AtomicReference<>();
    AtomicInteger status = new AtomicInteger();
    AtomicInteger closed = new AtomicInteger();
    Handler<HttpServerRequest> requestHandler = req -> {
        if (first.compareAndSet(null, req)) {
            req.exceptionHandler(err -> {
                fail();
            });
            req.response().closeHandler(err -> {
                closed.incrementAndGet();
            });
            req.response().endHandler(err -> {
                closed.incrementAndGet();
            });
        } else {
            assertEquals(0, status.getAndIncrement());
            req.exceptionHandler(err -> {
                closed.incrementAndGet();
            });
            req.response().closeHandler(err -> {
                closed.incrementAndGet();
            });
            req.response().endHandler(err -> {
                closed.incrementAndGet();
            });
            HttpConnection conn = req.connection();
            conn.closeHandler(v -> {
                assertEquals(5, closed.get());
                assertEquals(1, status.get());
                complete();
            });
            conn.shutdownHandler(v -> {
                assertEquals(1, status.get());
                complete();
            });
            conn.goAway(2, first.get().response().streamId());
        }
    };
    testServerSendGoAway(requestHandler, 2);
}
Also used : Arrays(java.util.Arrays) GZIPInputStream(java.util.zip.GZIPInputStream) HttpServer(io.vertx.core.http.HttpServer) MultiMap(io.vertx.core.MultiMap) Http2ConnectionEncoder(io.netty.handler.codec.http2.Http2ConnectionEncoder) DefaultHttp2Connection(io.netty.handler.codec.http2.DefaultHttp2Connection) Context(io.vertx.core.Context) Unpooled(io.netty.buffer.Unpooled) Http2ConnectionDecoder(io.netty.handler.codec.http2.Http2ConnectionDecoder) ByteArrayInputStream(java.io.ByteArrayInputStream) HttpVersion(io.vertx.core.http.HttpVersion) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Http2Exception(io.netty.handler.codec.http2.Http2Exception) Map(java.util.Map) ApplicationProtocolNegotiationHandler(io.netty.handler.ssl.ApplicationProtocolNegotiationHandler) ReadStream(io.vertx.core.streams.ReadStream) AbstractHttp2ConnectionHandlerBuilder(io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder) Http2FrameAdapter(io.netty.handler.codec.http2.Http2FrameAdapter) StreamResetException(io.vertx.core.http.StreamResetException) ChannelDuplexHandler(io.netty.channel.ChannelDuplexHandler) ChannelInitializer(io.netty.channel.ChannelInitializer) Http2Flags(io.netty.handler.codec.http2.Http2Flags) Set(java.util.Set) ChannelPipeline(io.netty.channel.ChannelPipeline) Http2ConnectionHandler(io.netty.handler.codec.http2.Http2ConnectionHandler) Future(io.vertx.core.Future) InetSocketAddress(java.net.InetSocketAddress) Collectors(java.util.stream.Collectors) NioEventLoopGroup(io.netty.channel.nio.NioEventLoopGroup) StandardCharsets(java.nio.charset.StandardCharsets) Base64(java.util.Base64) List(java.util.List) Buffer(io.vertx.core.buffer.Buffer) SslHandler(io.netty.handler.ssl.SslHandler) Http2Headers(io.netty.handler.codec.http2.Http2Headers) HttpServerResponse(io.vertx.core.http.HttpServerResponse) Http2Error(io.netty.handler.codec.http2.Http2Error) HttpClient(io.vertx.core.http.HttpClient) NetSocket(io.vertx.core.net.NetSocket) Trust(io.vertx.test.core.tls.Trust) NioSocketChannel(io.netty.channel.socket.nio.NioSocketChannel) HttpServerRequest(io.vertx.core.http.HttpServerRequest) ByteArrayOutputStream(java.io.ByteArrayOutputStream) Http2EventAdapter(io.netty.handler.codec.http2.Http2EventAdapter) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) HashMap(java.util.HashMap) AtomicReference(java.util.concurrent.atomic.AtomicReference) Function(java.util.function.Function) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) ChannelHandlerContext(io.netty.channel.ChannelHandlerContext) HttpClientRequest(io.vertx.core.http.HttpClientRequest) ByteBuf(io.netty.buffer.ByteBuf) WriteStream(io.vertx.core.streams.WriteStream) Http2Stream(io.netty.handler.codec.http2.Http2Stream) BiConsumer(java.util.function.BiConsumer) AsyncResult(io.vertx.core.AsyncResult) HttpClientOptions(io.vertx.core.http.HttpClientOptions) HttpConnection(io.vertx.core.http.HttpConnection) EventLoopGroup(io.netty.channel.EventLoopGroup) VertxInternal(io.vertx.core.impl.VertxInternal) ClosedChannelException(java.nio.channels.ClosedChannelException) Vertx(io.vertx.core.Vertx) FileOutputStream(java.io.FileOutputStream) ApplicationProtocolNames(io.netty.handler.ssl.ApplicationProtocolNames) Test(org.junit.Test) IOException(java.io.IOException) SSLHelper(io.vertx.core.net.impl.SSLHelper) File(java.io.File) ChannelFuture(io.netty.channel.ChannelFuture) Channel(io.netty.channel.Channel) Http2Settings(io.netty.handler.codec.http2.Http2Settings) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) Bootstrap(io.netty.bootstrap.Bootstrap) AtomicLong(java.util.concurrent.atomic.AtomicLong) Http2Connection(io.netty.handler.codec.http2.Http2Connection) HttpMethod(io.vertx.core.http.HttpMethod) HttpUtils(io.vertx.core.http.impl.HttpUtils) HttpServerOptions(io.vertx.core.http.HttpServerOptions) HttpHeaderNames(io.netty.handler.codec.http.HttpHeaderNames) Handler(io.vertx.core.Handler) Collections(java.util.Collections) TestUtils.assertIllegalStateException(io.vertx.test.core.TestUtils.assertIllegalStateException) DefaultHttp2Headers(io.netty.handler.codec.http2.DefaultHttp2Headers) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) HttpConnection(io.vertx.core.http.HttpConnection) HttpServerRequest(io.vertx.core.http.HttpServerRequest) AtomicReference(java.util.concurrent.atomic.AtomicReference) Test(org.junit.Test)

Example 9 with HttpServerRequest

use of io.vertx.core.http.HttpServerRequest in project vert.x by eclipse.

the class Http2ServerTest method testClientSendGoAwayInternalError.

@Test
public void testClientSendGoAwayInternalError() throws Exception {
    Future<Void> abc = Future.future();
    Context ctx = vertx.getOrCreateContext();
    Handler<HttpServerRequest> requestHandler = req -> {
        HttpConnection conn = req.connection();
        AtomicInteger status = new AtomicInteger();
        conn.goAwayHandler(ga -> {
            assertOnIOContext(ctx);
            assertEquals(0, status.getAndIncrement());
            req.response().end();
        });
        conn.shutdownHandler(v -> {
            assertOnIOContext(ctx);
            assertEquals(1, status.getAndIncrement());
        });
        conn.closeHandler(v -> {
            assertEquals(2, status.getAndIncrement());
            testComplete();
        });
        abc.complete();
    };
    server.requestHandler(requestHandler);
    startServer(ctx);
    TestClient client = new TestClient();
    ChannelFuture fut = client.connect(DEFAULT_HTTPS_PORT, DEFAULT_HTTPS_HOST, request -> {
        Http2ConnectionEncoder encoder = request.encoder;
        int id = request.nextStreamId();
        encoder.writeHeaders(request.context, id, GET("/"), 0, true, request.context.newPromise());
        request.context.flush();
        abc.setHandler(ar -> {
            encoder.writeGoAway(request.context, id, 3, Unpooled.EMPTY_BUFFER, request.context.newPromise());
            request.context.flush();
        });
    });
    fut.sync();
    await();
}
Also used : Context(io.vertx.core.Context) ChannelHandlerContext(io.netty.channel.ChannelHandlerContext) Arrays(java.util.Arrays) GZIPInputStream(java.util.zip.GZIPInputStream) HttpServer(io.vertx.core.http.HttpServer) MultiMap(io.vertx.core.MultiMap) Http2ConnectionEncoder(io.netty.handler.codec.http2.Http2ConnectionEncoder) DefaultHttp2Connection(io.netty.handler.codec.http2.DefaultHttp2Connection) Context(io.vertx.core.Context) Unpooled(io.netty.buffer.Unpooled) Http2ConnectionDecoder(io.netty.handler.codec.http2.Http2ConnectionDecoder) ByteArrayInputStream(java.io.ByteArrayInputStream) HttpVersion(io.vertx.core.http.HttpVersion) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Http2Exception(io.netty.handler.codec.http2.Http2Exception) Map(java.util.Map) ApplicationProtocolNegotiationHandler(io.netty.handler.ssl.ApplicationProtocolNegotiationHandler) ReadStream(io.vertx.core.streams.ReadStream) AbstractHttp2ConnectionHandlerBuilder(io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder) Http2FrameAdapter(io.netty.handler.codec.http2.Http2FrameAdapter) StreamResetException(io.vertx.core.http.StreamResetException) ChannelDuplexHandler(io.netty.channel.ChannelDuplexHandler) ChannelInitializer(io.netty.channel.ChannelInitializer) Http2Flags(io.netty.handler.codec.http2.Http2Flags) Set(java.util.Set) ChannelPipeline(io.netty.channel.ChannelPipeline) Http2ConnectionHandler(io.netty.handler.codec.http2.Http2ConnectionHandler) Future(io.vertx.core.Future) InetSocketAddress(java.net.InetSocketAddress) Collectors(java.util.stream.Collectors) NioEventLoopGroup(io.netty.channel.nio.NioEventLoopGroup) StandardCharsets(java.nio.charset.StandardCharsets) Base64(java.util.Base64) List(java.util.List) Buffer(io.vertx.core.buffer.Buffer) SslHandler(io.netty.handler.ssl.SslHandler) Http2Headers(io.netty.handler.codec.http2.Http2Headers) HttpServerResponse(io.vertx.core.http.HttpServerResponse) Http2Error(io.netty.handler.codec.http2.Http2Error) HttpClient(io.vertx.core.http.HttpClient) NetSocket(io.vertx.core.net.NetSocket) Trust(io.vertx.test.core.tls.Trust) NioSocketChannel(io.netty.channel.socket.nio.NioSocketChannel) HttpServerRequest(io.vertx.core.http.HttpServerRequest) ByteArrayOutputStream(java.io.ByteArrayOutputStream) Http2EventAdapter(io.netty.handler.codec.http2.Http2EventAdapter) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) HashMap(java.util.HashMap) AtomicReference(java.util.concurrent.atomic.AtomicReference) Function(java.util.function.Function) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) ChannelHandlerContext(io.netty.channel.ChannelHandlerContext) HttpClientRequest(io.vertx.core.http.HttpClientRequest) ByteBuf(io.netty.buffer.ByteBuf) WriteStream(io.vertx.core.streams.WriteStream) Http2Stream(io.netty.handler.codec.http2.Http2Stream) BiConsumer(java.util.function.BiConsumer) AsyncResult(io.vertx.core.AsyncResult) HttpClientOptions(io.vertx.core.http.HttpClientOptions) HttpConnection(io.vertx.core.http.HttpConnection) EventLoopGroup(io.netty.channel.EventLoopGroup) VertxInternal(io.vertx.core.impl.VertxInternal) ClosedChannelException(java.nio.channels.ClosedChannelException) Vertx(io.vertx.core.Vertx) FileOutputStream(java.io.FileOutputStream) ApplicationProtocolNames(io.netty.handler.ssl.ApplicationProtocolNames) Test(org.junit.Test) IOException(java.io.IOException) SSLHelper(io.vertx.core.net.impl.SSLHelper) File(java.io.File) ChannelFuture(io.netty.channel.ChannelFuture) Channel(io.netty.channel.Channel) Http2Settings(io.netty.handler.codec.http2.Http2Settings) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) Bootstrap(io.netty.bootstrap.Bootstrap) AtomicLong(java.util.concurrent.atomic.AtomicLong) Http2Connection(io.netty.handler.codec.http2.Http2Connection) HttpMethod(io.vertx.core.http.HttpMethod) HttpUtils(io.vertx.core.http.impl.HttpUtils) HttpServerOptions(io.vertx.core.http.HttpServerOptions) HttpHeaderNames(io.netty.handler.codec.http.HttpHeaderNames) Handler(io.vertx.core.Handler) Collections(java.util.Collections) TestUtils.assertIllegalStateException(io.vertx.test.core.TestUtils.assertIllegalStateException) DefaultHttp2Headers(io.netty.handler.codec.http2.DefaultHttp2Headers) ChannelFuture(io.netty.channel.ChannelFuture) HttpConnection(io.vertx.core.http.HttpConnection) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) HttpServerRequest(io.vertx.core.http.HttpServerRequest) Http2ConnectionEncoder(io.netty.handler.codec.http2.Http2ConnectionEncoder) Test(org.junit.Test)

Example 10 with HttpServerRequest

use of io.vertx.core.http.HttpServerRequest in project vert.x by eclipse.

the class Http2ServerTest method testShutdownWithTimeout.

@Test
public void testShutdownWithTimeout() throws Exception {
    waitFor(2);
    AtomicInteger closed = new AtomicInteger();
    AtomicReference<HttpServerRequest> first = new AtomicReference<>();
    AtomicInteger status = new AtomicInteger();
    Handler<HttpServerRequest> requestHandler = req -> {
        if (first.compareAndSet(null, req)) {
            req.exceptionHandler(err -> {
                fail();
            });
            req.response().closeHandler(err -> {
                closed.incrementAndGet();
            });
            req.response().endHandler(err -> {
                closed.incrementAndGet();
            });
        } else {
            assertEquals(0, status.getAndIncrement());
            req.exceptionHandler(err -> {
                fail();
            });
            req.response().closeHandler(err -> {
                closed.incrementAndGet();
            });
            req.response().endHandler(err -> {
                closed.incrementAndGet();
            });
            HttpConnection conn = req.connection();
            conn.closeHandler(v -> {
                assertEquals(4, closed.get());
                assertEquals(1, status.getAndIncrement());
                complete();
            });
            conn.shutdown(300);
        }
    };
    testServerSendGoAway(requestHandler, 0);
}
Also used : Arrays(java.util.Arrays) GZIPInputStream(java.util.zip.GZIPInputStream) HttpServer(io.vertx.core.http.HttpServer) MultiMap(io.vertx.core.MultiMap) Http2ConnectionEncoder(io.netty.handler.codec.http2.Http2ConnectionEncoder) DefaultHttp2Connection(io.netty.handler.codec.http2.DefaultHttp2Connection) Context(io.vertx.core.Context) Unpooled(io.netty.buffer.Unpooled) Http2ConnectionDecoder(io.netty.handler.codec.http2.Http2ConnectionDecoder) ByteArrayInputStream(java.io.ByteArrayInputStream) HttpVersion(io.vertx.core.http.HttpVersion) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Http2Exception(io.netty.handler.codec.http2.Http2Exception) Map(java.util.Map) ApplicationProtocolNegotiationHandler(io.netty.handler.ssl.ApplicationProtocolNegotiationHandler) ReadStream(io.vertx.core.streams.ReadStream) AbstractHttp2ConnectionHandlerBuilder(io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder) Http2FrameAdapter(io.netty.handler.codec.http2.Http2FrameAdapter) StreamResetException(io.vertx.core.http.StreamResetException) ChannelDuplexHandler(io.netty.channel.ChannelDuplexHandler) ChannelInitializer(io.netty.channel.ChannelInitializer) Http2Flags(io.netty.handler.codec.http2.Http2Flags) Set(java.util.Set) ChannelPipeline(io.netty.channel.ChannelPipeline) Http2ConnectionHandler(io.netty.handler.codec.http2.Http2ConnectionHandler) Future(io.vertx.core.Future) InetSocketAddress(java.net.InetSocketAddress) Collectors(java.util.stream.Collectors) NioEventLoopGroup(io.netty.channel.nio.NioEventLoopGroup) StandardCharsets(java.nio.charset.StandardCharsets) Base64(java.util.Base64) List(java.util.List) Buffer(io.vertx.core.buffer.Buffer) SslHandler(io.netty.handler.ssl.SslHandler) Http2Headers(io.netty.handler.codec.http2.Http2Headers) HttpServerResponse(io.vertx.core.http.HttpServerResponse) Http2Error(io.netty.handler.codec.http2.Http2Error) HttpClient(io.vertx.core.http.HttpClient) NetSocket(io.vertx.core.net.NetSocket) Trust(io.vertx.test.core.tls.Trust) NioSocketChannel(io.netty.channel.socket.nio.NioSocketChannel) HttpServerRequest(io.vertx.core.http.HttpServerRequest) ByteArrayOutputStream(java.io.ByteArrayOutputStream) Http2EventAdapter(io.netty.handler.codec.http2.Http2EventAdapter) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) HashMap(java.util.HashMap) AtomicReference(java.util.concurrent.atomic.AtomicReference) Function(java.util.function.Function) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) ChannelHandlerContext(io.netty.channel.ChannelHandlerContext) HttpClientRequest(io.vertx.core.http.HttpClientRequest) ByteBuf(io.netty.buffer.ByteBuf) WriteStream(io.vertx.core.streams.WriteStream) Http2Stream(io.netty.handler.codec.http2.Http2Stream) BiConsumer(java.util.function.BiConsumer) AsyncResult(io.vertx.core.AsyncResult) HttpClientOptions(io.vertx.core.http.HttpClientOptions) HttpConnection(io.vertx.core.http.HttpConnection) EventLoopGroup(io.netty.channel.EventLoopGroup) VertxInternal(io.vertx.core.impl.VertxInternal) ClosedChannelException(java.nio.channels.ClosedChannelException) Vertx(io.vertx.core.Vertx) FileOutputStream(java.io.FileOutputStream) ApplicationProtocolNames(io.netty.handler.ssl.ApplicationProtocolNames) Test(org.junit.Test) IOException(java.io.IOException) SSLHelper(io.vertx.core.net.impl.SSLHelper) File(java.io.File) ChannelFuture(io.netty.channel.ChannelFuture) Channel(io.netty.channel.Channel) Http2Settings(io.netty.handler.codec.http2.Http2Settings) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) Bootstrap(io.netty.bootstrap.Bootstrap) AtomicLong(java.util.concurrent.atomic.AtomicLong) Http2Connection(io.netty.handler.codec.http2.Http2Connection) HttpMethod(io.vertx.core.http.HttpMethod) HttpUtils(io.vertx.core.http.impl.HttpUtils) HttpServerOptions(io.vertx.core.http.HttpServerOptions) HttpHeaderNames(io.netty.handler.codec.http.HttpHeaderNames) Handler(io.vertx.core.Handler) Collections(java.util.Collections) TestUtils.assertIllegalStateException(io.vertx.test.core.TestUtils.assertIllegalStateException) DefaultHttp2Headers(io.netty.handler.codec.http2.DefaultHttp2Headers) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) HttpConnection(io.vertx.core.http.HttpConnection) HttpServerRequest(io.vertx.core.http.HttpServerRequest) AtomicReference(java.util.concurrent.atomic.AtomicReference) Test(org.junit.Test)

Aggregations

HttpServerRequest (io.vertx.core.http.HttpServerRequest)31 Test (org.junit.Test)27 MultiMap (io.vertx.core.MultiMap)16 IOException (java.io.IOException)16 Buffer (io.vertx.core.buffer.Buffer)14 ArrayList (java.util.ArrayList)14 HttpServerOptions (io.vertx.core.http.HttpServerOptions)13 HashSet (java.util.HashSet)13 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)12 Bootstrap (io.netty.bootstrap.Bootstrap)10 ByteBuf (io.netty.buffer.ByteBuf)10 Unpooled (io.netty.buffer.Unpooled)10 Channel (io.netty.channel.Channel)10 ChannelDuplexHandler (io.netty.channel.ChannelDuplexHandler)10 ChannelFuture (io.netty.channel.ChannelFuture)10 ChannelHandlerContext (io.netty.channel.ChannelHandlerContext)10 ChannelInitializer (io.netty.channel.ChannelInitializer)10 ChannelPipeline (io.netty.channel.ChannelPipeline)10 EventLoopGroup (io.netty.channel.EventLoopGroup)10 NioEventLoopGroup (io.netty.channel.nio.NioEventLoopGroup)10