public abstract class BasePacket extends Object implements IPacket
Modifier and Type | Field and Description |
---|---|
protected IPacket |
parent |
protected IPacket |
payload |
Constructor and Description |
---|
BasePacket() |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
This implementation of clone() is here to preserve backwards compatibility.
|
boolean |
equals(Object obj) |
IPacket |
getParent()
Obtain the parent packet.
|
IPacket |
getPayload()
Obtain the packet payload.
|
int |
hashCode() |
void |
resetChecksum()
Reset any checksum as needed, and call resetChecksum on all parents.
|
IPacket |
setParent(IPacket parent)
Configure a new parent packet.
|
IPacket |
setPayload(IPacket payload)
Assign the packet payload.
|
public IPacket getParent()
IPacket
public IPacket setParent(IPacket parent)
IPacket
public IPacket getPayload()
IPacket
getPayload
in interface IPacket
public IPacket setPayload(IPacket payload)
IPacket
setPayload
in interface IPacket
payload
- new payloadpublic void resetChecksum()
IPacket
resetChecksum
in interface IPacket