-
- 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 booleanfinprivate booleantransferemasked
-
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 voidsetFin(boolean fin)Set the fin of this frame to the provided boolean voidsetTransferemasked(boolean transferemasked)Set the tranferemask of this frame to the provided boolean abstract voidisValid()Check if the frame is valid due to specification booleanisRSV1()Indicates that this frame has the rsv1 bit set. booleanisRSV2()Indicates that this frame has the rsv2 bit set. booleanisRSV3()Indicates that this frame has the rsv3 bit set. booleanisFin()Indicates that this is the final fragment in a message. OpcodegetOpcode()Defines the interpretation of the "Payload data". booleangetTransfereMasked()Defines whether the "Payload data" is masked. ByteBuffergetPayloadData()The "Payload data" which was sent in this frame voidappend(Framedata nextframe)Appends an additional frame to the current frameThis methods does not override the opcode, but does override the fin StringtoString()voidsetPayload(ByteBuffer payload)Set the payload of this frame to the provided payload voidsetRSV1(boolean rsv1)Set the rsv1 of this frame to the provided boolean voidsetRSV2(boolean rsv2)Set the rsv2 of this frame to the provided boolean voidsetRSV3(boolean rsv3)Set the rsv3 of this frame to the provided boolean static FramedataImpl1get(Opcode opcode)Get a frame with a specific opcode booleanequals(Object o)inthashCode()-
-
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.
-
getTransfereMasked
boolean getTransfereMasked()
Defines whether the "Payload data" is masked.
-
getPayloadData
ByteBuffer getPayloadData()
The "Payload data" which was sent in this frame
-
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
-
hashCode
int hashCode()
-
-
-
-