Package in.dragonbra.javasteam.base
Class PacketClientMsg
- java.lang.Object
-
- in.dragonbra.javasteam.base.PacketClientMsg
-
- All Implemented Interfaces:
IPacketMsg
public class PacketClientMsg extends java.lang.Object implements IPacketMsg
Represents a packet message with extended header information.
-
-
Constructor Summary
Constructors Constructor Description PacketClientMsg(EMsg eMsg, byte[] data)Initializes a new instance of thePacketClientMsgclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getData()Gets the underlying data that represents this client message.EMsggetMsgType()Gets the network message type of this packet message.longgetSourceJobID()Gets the source job id for this packet message.longgetTargetJobID()Gets the target job id for this packet message.booleanisProto()Gets a value indicating whether this packet message is protobuf backed.
-
-
-
Constructor Detail
-
PacketClientMsg
public PacketClientMsg(EMsg eMsg, byte[] data) throws java.io.IOException
Initializes a new instance of thePacketClientMsgclass.- Parameters:
eMsg- The network message type for this packet message.data- The data.- Throws:
java.io.IOException- exception while deserializing the data
-
-
Method Detail
-
isProto
public boolean isProto()
Description copied from interface:IPacketMsgGets a value indicating whether this packet message is protobuf backed.- Specified by:
isProtoin interfaceIPacketMsg- Returns:
- true if this instance is protobuf backed; otherwise, false
-
getMsgType
public EMsg getMsgType()
Description copied from interface:IPacketMsgGets the network message type of this packet message.- Specified by:
getMsgTypein interfaceIPacketMsg- Returns:
- The message type.
-
getTargetJobID
public long getTargetJobID()
Description copied from interface:IPacketMsgGets the target job id for this packet message.- Specified by:
getTargetJobIDin interfaceIPacketMsg- Returns:
- The target job id.
-
getSourceJobID
public long getSourceJobID()
Description copied from interface:IPacketMsgGets the source job id for this packet message.- Specified by:
getSourceJobIDin interfaceIPacketMsg- Returns:
- The source job id.
-
getData
public byte[] getData()
Description copied from interface:IPacketMsgGets the underlying data that represents this client message.- Specified by:
getDatain interfaceIPacketMsg- Returns:
- The data.
-
-