public abstract class FramedataImpl1 extends Object implements Framedata
Constructor and Description |
---|
FramedataImpl1(Opcode op)
Constructor for a FramedataImpl without any attributes set apart from the opcode
|
Modifier and Type | Method and Description |
---|---|
void |
append(Framedata nextframe)
Appends an additional frame to the current frame
This methods does not override the opcode, but does override the fin
|
boolean |
equals(Object o) |
static FramedataImpl1 |
get(Opcode opcode)
Get a frame with a specific opcode
|
Opcode |
getOpcode()
Defines the interpretation of the "Payload data".
|
ByteBuffer |
getPayloadData()
The "Payload data" which was sent in this frame
|
boolean |
getTransfereMasked()
Defines whether the "Payload data" is masked.
|
int |
hashCode() |
boolean |
isFin()
Indicates that this is the final fragment in a message.
|
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.
|
abstract void |
isValid()
Check if the frame is valid due to specification
|
void |
setFin(boolean fin)
Set the fin of this frame to the provided boolean
|
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
|
void |
setTransferemasked(boolean transferemasked)
Set the tranferemask of this frame to the provided boolean
|
String |
toString() |
public FramedataImpl1(Opcode op)
op
- the opcode to usepublic abstract void isValid() throws InvalidDataException
InvalidDataException
- thrown if the frame is not a valid framepublic boolean isRSV1()
Framedata
public boolean isRSV2()
Framedata
public boolean isRSV3()
Framedata
public boolean isFin()
Framedata
public Opcode getOpcode()
Framedata
public boolean getTransfereMasked()
Framedata
getTransfereMasked
in interface Framedata
public ByteBuffer getPayloadData()
Framedata
getPayloadData
in interface Framedata
public void append(Framedata nextframe)
Framedata
This methods does not override the opcode, but does override the fin
public void setPayload(ByteBuffer payload)
payload
- the payload which is to setpublic void setFin(boolean fin)
fin
- true if fin has to be setpublic void setRSV1(boolean rsv1)
rsv1
- true if rsv1 has to be setpublic void setRSV2(boolean rsv2)
rsv2
- true if rsv2 has to be setpublic void setRSV3(boolean rsv3)
rsv3
- true if rsv3 has to be setpublic void setTransferemasked(boolean transferemasked)
transferemasked
- true if transferemasked has to be setpublic static FramedataImpl1 get(Opcode opcode)
opcode
- the opcode representing the frameCopyright © 2022. All rights reserved.