Code example for SelectionKey

Methods: isValid

0
        return mCompletedCallback;
    } 
 
    @Override 
    public boolean isOpen() { 
        return mChannel.isConnected() && mKey.isValid();
    } 
     
    boolean mPaused = false;
    @Override 
    public void pause() { 
        if (mServer.getAffinity() != Thread.currentThread()) {
            mServer.run(new Runnable() {
                @Override 
                public void run() { 
                    pause(); 
                } 
            }); 
            return; 
        }