private void enqueueChannel(final SocketChannel socketChannel) { try { workerSelector.next().enqueueChannel(socketChannel); } catch (final IOReactorShutdownException ex) { initiateShutdown(); } }
void disconnected() { if (sessionListener != null) { sessionListener.disconnected(this); } final IOEventHandler handler = ensureHandler(); handler.disconnected(this); }
static Selector newSelector(final SingleCoreIOReactor[] dispatchers) { return isPowerOfTwo(dispatchers.length) ? new PowerOfTwoSelector(dispatchers) : new GenericSelector(dispatchers); }
@Override public void exception(final IOSession session, final Exception cause) { try { cleanupRequests(cause); } finally { session.close(CloseMode.IMMEDIATE); } }
@Override public boolean isClosed() { return getSessionImpl().isClosed(); }
@Override public void enqueue(final Command command, final Command.Priority priority) { getSessionImpl().enqueue(command, priority); }
@Override void onException(final Exception cause) { final IOEventHandler handler = ensureHandler(); if (sessionListener != null) { sessionListener.exception(this, cause); } handler.exception(this, cause); }
@Override public ByteChannel channel() { return getSessionImpl().channel(); }
@Override public void setEvent(final int op) { getSessionImpl().setEvent(op); }
@Override public void clearEvent(final int op) { getSessionImpl().clearEvent(op); }
@Override public int getStatus() { return getSessionImpl().getStatus(); }
@Override public Command poll() { return getSessionImpl().poll(); }
@Override public int getEventMask() { return getSessionImpl().getEventMask(); }
@Override public void setEventMask(final int ops) { getSessionImpl().setEventMask(ops); }
@Override void onException(final Exception cause) { final IOEventHandler handler = ensureHandler(); if (sessionListener != null) { sessionListener.exception(this, cause); } handler.exception(this, cause); }
private void enqueueChannel(final SocketChannel socketChannel) { try { workerSelector.next().enqueueChannel(socketChannel); } catch (final IOReactorShutdownException ex) { initiateShutdown(); } }
void disconnected() { if (sessionListener != null) { sessionListener.disconnected(this); } final IOEventHandler handler = ensureHandler(); handler.disconnected(this); }
static Selector newSelector(final SingleCoreIOReactor[] dispatchers) { return isPowerOfTwo(dispatchers.length) ? new PowerOfTwoSelector(dispatchers) : new GenericSelector(dispatchers); }