}
public void bind(Collection<? extends SocketAddress> addresses) throws IOException {
for (SocketAddress address : addresses) {
logger.debug("Binding Nio2Acceptor to address {}", address);
AsynchronousServerSocketChannel socket = AsynchronousServerSocketChannel.open(group);
socket.setOption(StandardSocketOptions.SO_REUSEADDR, Boolean.TRUE);
socket.bind(address, backlog);
SocketAddress local = socket.getLocalAddress();
channels.put(local, socket);
socket.accept(local, new AcceptCompletionHandler(socket));
}
}