Code example for Selector

Methods: close

0
    } 
 
    @Override 
    protected void implCloseSelectableChannel() throws IOException { 
        socketChannel.close();
        selector.close();
    } 
 
    @Override 
    protected void implConfigureBlocking(boolean block) throws IOException {
        throw new UnsupportedOperationException("This class is blocking implementation of SocketChannel");
    } 
 
    @Override 
    public Socket socket() {
        return socketChannel.socket();
    } 
 
    @Override 
    public boolean isConnected() { 
        return socketChannel.isConnected();