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
ConstructorDescriptionNettyServer
(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:Server
Start this server. -
close
public void close()Description copied from interface:Server
Stop this server. -
getPort
public int getPort()Description copied from interface:Server
The port this server runs on. -
join
Description copied from interface:Server
Wait for this server to exit.- Specified by:
join
in interfaceServer
- Throws:
InterruptedException
-
getNumActiveConnections
public int getNumActiveConnections()- Returns:
- The number of clients currently connected to this server.
-