Class Masker

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterRead​(java.nio.ByteBuffer buf, int position, int length)
      Is called on the ByteBuffer after a read operation completes
      void beforeWrite​(java.nio.ByteBuffer buf, int position, int length)
      Is called on the ByteBuffer before a write operation completes
      void complete()
      Is called to complete the ChannelFunction.
      void newFrame​(FrameHeaderData headerData)  
      void setMaskingKey​(int maskingKey)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setMaskingKey

        public void setMaskingKey​(int maskingKey)
      • afterRead

        public void afterRead​(java.nio.ByteBuffer buf,
                              int position,
                              int length)
        Description copied from interface: ChannelFunction
        Is called on the ByteBuffer after a read operation completes
        Specified by:
        afterRead in interface ChannelFunction
        Parameters:
        buf - the ByteBuffer to operate on
        position - the index in the ByteBuffer to start from
        length - the number of bytes to operate on
      • beforeWrite

        public void beforeWrite​(java.nio.ByteBuffer buf,
                                int position,
                                int length)
        Description copied from interface: ChannelFunction
        Is called on the ByteBuffer before a write operation completes
        Specified by:
        beforeWrite in interface ChannelFunction
        Parameters:
        buf - the ByteBuffer to operate on
        position - the index in the ByteBuffer to start from
        length - the number of bytes to operate on