|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mindtree.techworks.insight.remoteprotocol.spi.DataPacket
public class DataPacket
Represents a data packet sent to Insight. The packet concists of a header
which in the Java world is the
class, and some content of the packet, which are represented by the
subclasses of
PacketHeader.
PacketDataContent
The format of the data packet is described in the PacketHeader
class.
PacketHeader,
PacketDataContent,
Serialized Form| Field Summary | |
|---|---|
static int |
MAX_PACKET_SIZE
Maximum number of bytes a packet should have. |
| Constructor Summary | |
|---|---|
DataPacket()
Creates an instance of DataPacket |
|
DataPacket(PacketDataContent content,
PacketHeader header)
Creates a DataPacket instance |
|
| Method Summary | |
|---|---|
byte[] |
getDataPacketAsByteArray()
Returns the entire packet as a byte array. |
PacketDataContent |
getPacketDataContent()
Returns the content of the packet |
PacketHeader |
getPacketHeader()
Returns the packet's header |
void |
recalculatePacketHeader()
Recalculates the packet's data relative content. |
void |
setPacketDataContent(PacketDataContent packetDataContent)
Sets the content of the packet |
void |
setPacketHeader(PacketHeader packetHeader)
Sets the packet's header |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_PACKET_SIZE
| Constructor Detail |
|---|
public DataPacket(PacketDataContent content,
PacketHeader header)
content - The content of the packetheader - The header of the packetpublic DataPacket()
| Method Detail |
|---|
public PacketDataContent getPacketDataContent()
PacketDataContentpublic void setPacketDataContent(PacketDataContent packetDataContent)
packetDataContent - The PacketDataContent to setpublic PacketHeader getPacketHeader()
PacketHeaderpublic void setPacketHeader(PacketHeader packetHeader)
packetHeader - The PacketHeader to setpublic byte[] getDataPacketAsByteArray()
byte array.
public void recalculatePacketHeader()
PacketHeader.recalculateHeader(PacketDataContent)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||