Issue #1655 added setter for accept channel

This commit is contained in:
Greg Wilkins 2017-07-03 15:34:23 +02:00 committed by Joakim Erdfelt
parent 386ca510e6
commit 7dc2559c8b
1 changed files with 15 additions and 0 deletions

View File

@ -274,6 +274,20 @@ public class ServerConnector extends AbstractNetworkConnector
_inheritChannel = inheritChannel;
}
public ServerSocketChannel getAcceptChannel()
{
return _acceptChannel;
}
public void setAcceptChannel(ServerSocketChannel acceptChannel)
{
if (isStarted())
throw new IllegalStateException(getState());
updateBean(_acceptChannel,acceptChannel);
_acceptChannel = acceptChannel;
}
@Override
public void open() throws IOException
{
@ -288,6 +302,7 @@ public class ServerConnector extends AbstractNetworkConnector
}
}
/**
* Called by {@link #open()} to obtain the accepting channel.
* @return ServerSocketChannel used to accept connections.