Code example for SelectionKey

Methods: interestOps

0
            Assert.assertFalse(mChannel.isChunked());
            // register for a write notification if a write fails 
            mKey.interestOps(SelectionKey.OP_READ | SelectionKey.OP_WRITE);
        } 
        else { 
            mKey.interestOps(SelectionKey.OP_READ);
        } 
    } 
 
    @Override 
    public void write(final ByteBuffer b) {
        if (mServer.getAffinity() != Thread.currentThread()) {
            mServer.run(new Runnable() {
                @Override 
                public void run() { 
                    write(b);
                } 
            }); 
            return; 
        } 
        try {