Package org.apache.avro.ipc.netty
Class NettyServer
java.lang.Object
org.apache.avro.ipc.netty.NettyServer
- All Implemented Interfaces:
Server
A Netty-based RPC
Server implementation.-
Constructor Summary
ConstructorsConstructorDescriptionNettyServer(Responder responder, InetSocketAddress addr) NettyServer(Responder responder, InetSocketAddress addr, Consumer<io.netty.channel.socket.SocketChannel> initializer) NettyServer(Responder responder, InetSocketAddress addr, Consumer<io.netty.channel.socket.SocketChannel> initializer, Consumer<io.netty.bootstrap.ServerBootstrap> bootStrapInitialzier) NettyServer(Responder responder, InetSocketAddress addr, Consumer<io.netty.channel.socket.SocketChannel> initializer, Consumer<io.netty.bootstrap.ServerBootstrap> bootStrapInitialzier, io.netty.channel.EventLoopGroup bossGroup, io.netty.channel.EventLoopGroup workerGroup, io.netty.channel.EventLoopGroup callerGroup) -
Method Summary
-
Constructor Details
-
NettyServer
- Throws:
InterruptedException
-
NettyServer
public NettyServer(Responder responder, InetSocketAddress addr, Consumer<io.netty.channel.socket.SocketChannel> initializer) throws InterruptedException - Throws:
InterruptedException
-
NettyServer
public NettyServer(Responder responder, InetSocketAddress addr, Consumer<io.netty.channel.socket.SocketChannel> initializer, Consumer<io.netty.bootstrap.ServerBootstrap> bootStrapInitialzier) throws InterruptedException - Throws:
InterruptedException
-
NettyServer
public NettyServer(Responder responder, InetSocketAddress addr, Consumer<io.netty.channel.socket.SocketChannel> initializer, Consumer<io.netty.bootstrap.ServerBootstrap> bootStrapInitialzier, io.netty.channel.EventLoopGroup bossGroup, io.netty.channel.EventLoopGroup workerGroup, io.netty.channel.EventLoopGroup callerGroup) throws InterruptedException - Throws:
InterruptedException
-
-
Method Details
-
start
public void start()Description copied from interface:ServerStart this server. -
close
public void close()Description copied from interface:ServerStop this server. -
getPort
public int getPort()Description copied from interface:ServerThe port this server runs on. -
join
Description copied from interface:ServerWait for this server to exit.- Specified by:
joinin interfaceServer- Throws:
InterruptedException
-
getNumActiveConnections
public int getNumActiveConnections()- Returns:
- The number of clients currently connected to this server.
-