Class WebSocketFrame

java.lang.Object
com.predic8.membrane.core.transport.ws.WebSocketFrame

public class WebSocketFrame extends Object
  • Field Details

    • log

      protected static org.slf4j.Logger log
  • Constructor Details

    • WebSocketFrame

      public WebSocketFrame()
    • WebSocketFrame

      public WebSocketFrame(boolean fin, boolean rsv1, boolean rsv2, boolean rsv3, int opcode, boolean isMasked, byte[] maskingKey, byte[] payload)
  • Method Details

    • write

      public void write(OutputStream out) throws IOException
      Throws:
      IOException
    • getOpcode

      public int getOpcode()
    • setOpcode

      public void setOpcode(int opcode)
    • isMasked

      public boolean isMasked()
    • setMasked

      public void setMasked(boolean masked)
    • getPayloadLength

      public long getPayloadLength()
    • setPayloadLength

      public void setPayloadLength(long payloadLength)
    • getMaskKey

      public byte[] getMaskKey()
    • setMaskKey

      public void setMaskKey(byte[] maskKey)
    • getPayload

      public byte[] getPayload()
    • setPayload

      public void setPayload(byte[] payload)
    • tryRead

      public int tryRead(byte[] buffer, int offset, int length)
      Parameters:
      buffer -
      offset -
      length -
      Returns:
      the number of bytes read. if > 0, this class has been properly initialized with the frame data read.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toStringHex

      public String toStringHex()
    • toBytes

      public byte[] toBytes() throws IOException
      Throws:
      IOException
    • getOriginalExchange

      public Exchange getOriginalExchange()
    • setOriginalExchange

      public void setOriginalExchange(Exchange originalExchange)