T - The body type of this message.public final class ClientGCMsg<T extends IGCSerializableMessage> extends GCMsgBase<MsgGCHdr>
| Modifier and Type | Field and Description |
|---|---|
private T |
body
Gets the body structure of this message.
|
(package private) int |
msgType |
sourceJobID, targetJobID| Constructor and Description |
|---|
ClientGCMsg(Class<T> clazz) |
ClientGCMsg(Class<T> clazz,
GCMsgBase<MsgGCHdr> msg) |
ClientGCMsg(Class<T> clazz,
GCMsgBase<MsgGCHdr> msg,
int payloadReserve)
Initializes a new instance of the
ClientGCMsg class. |
ClientGCMsg(Class<T> clazz,
int payloadReserve)
Initializes a new instance of the
ClientGCMsg class. |
ClientGCMsg(Class<T> clazz,
IPacketGCMsg msg)
Initializes a new instance of the
ClientGCMsg class. |
| Modifier and Type | Method and Description |
|---|---|
void |
deSerialize(byte[] data)
Initializes this gc message by deserializing the specified data.
|
int |
getMsgType()
Gets the network message type of this gc message.
|
JobID |
getSourceJobID()
Gets the source job id for this gc message.
|
JobID |
getTargetJobID()
Gets the target job id for this gc message.
|
boolean |
isProto()
Gets a value indicating whether this gc message is protobuf backed.
|
byte[] |
serialize()
Serializes this gc message instance to a byte array.
|
void |
setSourceJobID(JobID value)
Sets the source job id for this gc message.
|
void |
setTargetJobID(JobID value)
Sets the target job id for this gc message.
|
int msgType
private T extends IGCSerializableMessage body
public ClientGCMsg(Class<T> clazz, int payloadReserve)
ClientGCMsg class.
This is a client send constructor.payloadReserve - The number of bytes to initialize the payload capacity to.public ClientGCMsg(Class<T> clazz, GCMsgBase<MsgGCHdr> msg, int payloadReserve)
ClientGCMsg class.
This a reply constructor.msg - The message that this instance is a reply for.payloadReserve - The number of bytes to initialize the payload capacity to.public ClientGCMsg(Class<T> clazz, IPacketGCMsg msg)
ClientGCMsg class.
This is a recieve constructor.msg - The packet message to build this gc message from.public boolean isProto()
public int getMsgType()
public JobID getTargetJobID()
public void setTargetJobID(JobID value)
value - The target job idpublic JobID getSourceJobID()
public void setSourceJobID(JobID value)
value - The source job idpublic byte[] serialize()
throws IOException
serialize in interface IClientGCMsgserialize in class GCMsgBase<MsgGCHdr>IOExceptionpublic void deSerialize(byte[] data)
throws IOException
deSerialize in interface IClientGCMsgdeSerialize in class GCMsgBase<MsgGCHdr>data - The data representing a client message.IOExceptionCopyright © 2012. All Rights Reserved.