protected boolean prepareClose ( ) { synchronized ( lock ) { final State state = this . state ; if ( state == State . OPEN ) { this . state = State . CLOSING ; lock . notifyAll ( ) ; return true ; } } return false ; }
Signal that we are about to close the channel . This will not have any affect on the underlying channel however prevent setting a new channel .