@Override
    protected void setInterestedInRead(NioSessionEx session, boolean isInterested) throws Exception {
        SelectionKey key = session.getSelectionKey();
        int oldInterestOps = key.interestOps();
        int newInterestOps = oldInterestOps;

        if (isInterested) {
            newInterestOps |= SelectionKey.OP_READ;
        } else {
            newInterestOps &= ~SelectionKey.OP_READ;
        }

        if (oldInterestOps != newInterestOps) {
            key.interestOps(newInterestOps);
        }
    }
@ Override protected void setInterestedInRead ( NioSessionEx session , boolean isInterested ) throws Exception { SelectionKey key = session . getSelectionKey ( ) ; int oldInterestOps = key . interestOps ( ) ; int newInterestOps = oldInterestOps ; if ( isInterested ) { newInterestOps |= SelectionKey . OP_READ ; } else { newInterestOps &= ~ SelectionKey . OP_READ ; } if ( oldInterestOps != newInterestOps ) { key . interestOps ( newInterestOps ) ; } }
{@inheritDoc}