Class NettyHttp2EchoServer

java.lang.Object
org.apache.kafka.common.network.netty.NettyHttp2EchoServer

public class NettyHttp2EchoServer extends Object
HTTP/2 echo server to test the HTTP/2 client implementation. It Echoes back any received data from a client.
  • Constructor Details

    • NettyHttp2EchoServer

      public NettyHttp2EchoServer()
  • Method Details

    • start

      public void start(boolean ssl) throws Exception
      Throws:
      Exception
    • stop

      public void stop()
      Stop all the connections and wait for them to close before returning.
    • beginStop

      public CompletableFuture<Void> beginStop()
      Begin stopping the server, returning a future that completes when shutdown is done.
    • address

      public InetSocketAddress address()
      Return the address on which the server is listening.
    • trackedChannels

      public io.netty.channel.group.ChannelGroup trackedChannels()
    • connectionCountSupplier

      public Supplier<Integer> connectionCountSupplier(long threadId)
    • totalConnections

      public int totalConnections()
    • workerGroup

      public io.netty.channel.EventLoopGroup workerGroup()
    • sendGoAway

      public void sendGoAway()
      Send a GOAWAY frame to all HTTP/2 connections on the server.
    • closeConnection

      public void closeConnection()
      Closes all connections on the server. Normally there will be only one connection that need to be closed to test the behavior of the client when the server closes the connection.