Package 

Class FramedataImpl1

  • All Implemented Interfaces:
    com.tds.common.websocket.framing.Framedata

    
    public abstract class FramedataImpl1
     implements Framedata
                        

    Abstract implementation of a frame

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean fin
      private boolean transferemasked
    • Constructor Summary

      Constructors 
      Constructor Description
      FramedataImpl1(Opcode op) Constructor for a FramedataImpl without any attributes set apart from the opcode
    • Method Summary

      Modifier and Type Method Description
      void setFin(boolean fin) Set the fin of this frame to the provided boolean
      void setTransferemasked(boolean transferemasked) Set the tranferemask of this frame to the provided boolean
      abstract void isValid() Check if the frame is valid due to specification
      boolean isRSV1() Indicates that this frame has the rsv1 bit set.
      boolean isRSV2() Indicates that this frame has the rsv2 bit set.
      boolean isRSV3() Indicates that this frame has the rsv3 bit set.
      boolean isFin() Indicates that this is the final fragment in a message.
      Opcode getOpcode() Defines the interpretation of the "Payload data".
      boolean getTransfereMasked() Defines whether the "Payload data" is masked.
      ByteBuffer getPayloadData() The "Payload data" which was sent in this frame
      void append(Framedata nextframe) Appends an additional frame to the current frameThis methods does not override the opcode, but does override the fin
      String toString()
      void setPayload(ByteBuffer payload) Set the payload of this frame to the provided payload
      void setRSV1(boolean rsv1) Set the rsv1 of this frame to the provided boolean
      void setRSV2(boolean rsv2) Set the rsv2 of this frame to the provided boolean
      void setRSV3(boolean rsv3) Set the rsv3 of this frame to the provided boolean
      static FramedataImpl1 get(Opcode opcode) Get a frame with a specific opcode
      boolean equals(Object o)
      int hashCode()
      • Methods inherited from class java.lang.Object

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

      • FramedataImpl1

        FramedataImpl1(Opcode op)
        Constructor for a FramedataImpl without any attributes set apart from the opcode
        Parameters:
        op - the opcode to use
    • Method Detail

      • setFin

         void setFin(boolean fin)

        Set the fin of this frame to the provided boolean

        Parameters:
        fin - true if fin has to be set
      • setTransferemasked

         void setTransferemasked(boolean transferemasked)

        Set the tranferemask of this frame to the provided boolean

        Parameters:
        transferemasked - true if transferemasked has to be set
      • isValid

         abstract void isValid()

        Check if the frame is valid due to specification

      • isRSV1

         boolean isRSV1()

        Indicates that this frame has the rsv1 bit set.

      • isRSV2

         boolean isRSV2()

        Indicates that this frame has the rsv2 bit set.

      • isRSV3

         boolean isRSV3()

        Indicates that this frame has the rsv3 bit set.

      • isFin

         boolean isFin()

        Indicates that this is the final fragment in a message. The first fragment MAY also be thefinal fragment.

      • getOpcode

         Opcode getOpcode()

        Defines the interpretation of the "Payload data".

      • getTransfereMasked

         boolean getTransfereMasked()

        Defines whether the "Payload data" is masked.

      • append

         void append(Framedata nextframe)

        Appends an additional frame to the current frame

        This methods does not override the opcode, but does override the fin

        Parameters:
        nextframe - the additional frame
      • setPayload

         void setPayload(ByteBuffer payload)

        Set the payload of this frame to the provided payload

        Parameters:
        payload - the payload which is to set
      • setRSV1

         void setRSV1(boolean rsv1)

        Set the rsv1 of this frame to the provided boolean

        Parameters:
        rsv1 - true if rsv1 has to be set
      • setRSV2

         void setRSV2(boolean rsv2)

        Set the rsv2 of this frame to the provided boolean

        Parameters:
        rsv2 - true if rsv2 has to be set
      • setRSV3

         void setRSV3(boolean rsv3)

        Set the rsv3 of this frame to the provided boolean

        Parameters:
        rsv3 - true if rsv3 has to be set
      • get

         static FramedataImpl1 get(Opcode opcode)

        Get a frame with a specific opcode

        Parameters:
        opcode - the opcode representing the frame