Introduced factory method to create JDK's Selector instances.

This commit is contained in:
Simone Bordet 2014-10-09 10:08:15 +02:00
parent 6ed0170913
commit 649eb7f3dc
1 changed files with 6 additions and 1 deletions

View File

@ -446,10 +446,15 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa
protected void doStart() throws Exception protected void doStart() throws Exception
{ {
super.doStart(); super.doStart();
_selector = Selector.open(); _selector = newSelector();
_state.set(State.PROCESS); _state.set(State.PROCESS);
} }
protected Selector newSelector() throws IOException
{
return Selector.open();
}
@Override @Override
protected void doStop() throws Exception protected void doStop() throws Exception
{ {