Class NettyHttp2EchoServer
java.lang.Object
org.apache.kafka.common.network.netty.NettyHttp2EchoServer
HTTP/2 echo server to test the HTTP/2 client implementation. It
Echoes back any received data from a client.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddress()Return the address on which the server is listening.Begin stopping the server, returning a future that completes when shutdown is done.voidCloses all connections on the server.connectionCountSupplier(long threadId) voidSend a GOAWAY frame to all HTTP/2 connections on the server.voidstart(boolean ssl) voidstop()Stop all the connections and wait for them to close before returning.intio.netty.channel.group.ChannelGroupio.netty.channel.EventLoopGroup
-
Constructor Details
-
NettyHttp2EchoServer
public NettyHttp2EchoServer()
-
-
Method Details
-
start
-
stop
public void stop()Stop all the connections and wait for them to close before returning. -
beginStop
Begin stopping the server, returning a future that completes when shutdown is done. -
address
Return the address on which the server is listening. -
trackedChannels
public io.netty.channel.group.ChannelGroup trackedChannels() -
connectionCountSupplier
-
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.
-