public void start() {
logger.info("Avro source starting:{}", this);
Responder responder = new SpecificResponder(AvroSourceProtocol.class, this);
if(maxThreads <= 0) {
server = new NettyServer(responder,
new InetSocketAddress(bindAddress, port));
} else {
server = new NettyServer(responder, new InetSocketAddress(bindAddress, port),
new NioServerSocketChannelFactory(Executors.newFixedThreadPool(maxThreads),
Executors.newFixedThreadPool(maxThreads)));
}
server.start();