registry = new SimpleServiceRegistry();
try {
Service service = new Service(SERVICE_NAME, TransportType.SOCKET, port);
registry.bind(service, httpIOHandler);
SocketAcceptor acceptor = (SocketAcceptor) registry.getIoAcceptor(TransportType.SOCKET);
configureFilters(acceptor);
acceptor.setExceptionMonitor(new LoggingExceptionMonitor());
LOG.info("NIO HTTP Transport bound on port " + port);
} catch (IOException e) {
throw new TransportException("NIOTransport Failed to bind to port " + port, e);
}
}