Package org.apache.avro.ipc.netty
Class NettyServer
java.lang.Object
org.apache.avro.ipc.netty.NettyServer
- All Implemented Interfaces:
org.apache.avro.ipc.Server
A Netty-based RPC
Server
implementation.-
Constructor Summary
ConstructorsConstructorDescriptionNettyServer
(org.apache.avro.ipc.Responder responder, InetSocketAddress addr) NettyServer
(org.apache.avro.ipc.Responder responder, InetSocketAddress addr, Consumer<io.netty.channel.socket.SocketChannel> initializer) NettyServer
(org.apache.avro.ipc.Responder responder, InetSocketAddress addr, Consumer<io.netty.channel.socket.SocketChannel> initializer, Consumer<io.netty.bootstrap.ServerBootstrap> bootStrapInitialzier) NettyServer
(org.apache.avro.ipc.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
public NettyServer(org.apache.avro.ipc.Responder responder, InetSocketAddress addr) throws InterruptedException - Throws:
InterruptedException
-
NettyServer
public NettyServer(org.apache.avro.ipc.Responder responder, InetSocketAddress addr, Consumer<io.netty.channel.socket.SocketChannel> initializer) throws InterruptedException - Throws:
InterruptedException
-
NettyServer
public NettyServer(org.apache.avro.ipc.Responder responder, InetSocketAddress addr, Consumer<io.netty.channel.socket.SocketChannel> initializer, Consumer<io.netty.bootstrap.ServerBootstrap> bootStrapInitialzier) throws InterruptedException - Throws:
InterruptedException
-
NettyServer
public NettyServer(org.apache.avro.ipc.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()- Specified by:
start
in interfaceorg.apache.avro.ipc.Server
-
close
public void close()- Specified by:
close
in interfaceorg.apache.avro.ipc.Server
-
getPort
public int getPort()- Specified by:
getPort
in interfaceorg.apache.avro.ipc.Server
-
join
- Specified by:
join
in interfaceorg.apache.avro.ipc.Server
- Throws:
InterruptedException
-
getNumActiveConnections
public int getNumActiveConnections()- Returns:
- The number of clients currently connected to this server.
-