Code example for SelectionKey

Methods: attachmentcancel

     * Do connection-close cleanup on a given SelectionKey. 
    private void cleanupSelectionkey(SelectionKey key) {
      // remove the records from the two maps 
      FrameBuffer buffer = (FrameBuffer)key.attachment();
      if (buffer != null) {
        // close the buffer 
      // cancel the selection key 
  } // SelectorThread 
   * Class that implements a sort of state machine around the interaction with 
   * a client and an invoker. It manages reading the frame size and frame data, 
   * getting it handed off as wrapped transports, and then the writing of 
   * reponse data back to the client. In the process it manages flipping the 
Stop searching for code, let great code find you!  Add Codota to your java IDE