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`

public class NettyServer extends Object implements org.apache.avro.ipc.Server
A Netty-based RPC `Server` implementation.

## Constructor Summary

Constructors
Constructor
Description
`NettyServer(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

Modifier and Type
Method
Description
`void`
`close()`
`int`
`getNumActiveConnections()`
`int`
`getPort()`
`void`
`join()`
`void`
`start()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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 interface `org.apache.avro.ipc.Server`

### close

public void close()

Specified by:
  `close` in interface `org.apache.avro.ipc.Server`

### getPort

public int getPort()

Specified by:
  `getPort` in interface `org.apache.avro.ipc.Server`

### join

public void join() throws InterruptedException

Specified by:
  `join` in interface `org.apache.avro.ipc.Server`
Throws:
  `InterruptedException`

### getNumActiveConnections

public int getNumActiveConnections()

Returns:
  The number of clients currently connected to this server.