@Override public boolean onAcceptInterest(SelectionKey key, Context context) throws IOException { ReadController auxController = nextController(); SelectorHandler protocolSelectorHandler = context.getSelectorHandler(); SelectableChannel channel = protocolSelectorHandler.acceptWithoutRegistration(key); if (channel != null) { protocolSelectorHandler.configureChannel(channel); SelectorHandler relativeSelectorHandler = auxController.getSelectorHandlerClone(protocolSelectorHandler); if (relativeSelectorHandler == null) { // Clone was not found - take correspondent protocol SelectorHandler relativeSelectorHandler = auxController.getSelectorHandler(protocolSelectorHandler.protocol()); } auxController.addChannel(channel, relativeSelectorHandler); } return false; }