super(factory, pipeline);
try {
socket = new ServerSocket();
} catch (IOException e) {
throw new ChannelException(
"Failed to open a server socket.", e);
}
try {
socket.setSoTimeout(1000);
} catch (IOException e) {
try {
socket.close();
} catch (IOException e2) {
logger.log(
Level.WARNING,
"Failed to close a partially initialized socket.", e2);
}
throw new ChannelException(
"Failed to set the server socket timeout.", e);
}
config = new DefaultServerSocketChannelConfig(socket);