public void addToChannel(Channel ch) throws IOException {
    ch.pipeline()
      .addFirst(ENCRYPTION_HANDLER_NAME, new EncryptionHandler(this))
      .addFirst(DECRYPTION_HANDLER_NAME, new DecryptionHandler(this));
  }
public void addToChannel ( Channel ch ) throws IOException { ch . pipeline ( ) . addFirst ( ENCRYPTION_HANDLER_NAME , new EncryptionHandler ( this ) ) . addFirst ( DECRYPTION_HANDLER_NAME , new DecryptionHandler ( this ) ) ; }
Add handlers to channel.

@param ch the channel for adding handlers
@throws IOException