Package in.dragonbra.javasteam.base
Class PacketClientMsgProtobuf
- java.lang.Object
-
- in.dragonbra.javasteam.base.PacketClientMsgProtobuf
-
- All Implemented Interfaces:
IPacketMsg
public class PacketClientMsgProtobuf extends java.lang.Object implements IPacketMsg
Represents a protobuf backed packet message.
-
-
Constructor Summary
Constructors Constructor Description PacketClientMsgProtobuf(EMsg eMsg, byte[] data)Initializes a new instance of thePacketClientMsgProtobufclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getData()Gets the underlying data that represents this client message.MsgHdrProtoBufgetHeader()Gets the header for this packet 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
-
PacketClientMsgProtobuf
public PacketClientMsgProtobuf(EMsg eMsg, byte[] data) throws java.io.IOException
Initializes a new instance of thePacketClientMsgProtobufclass.- Parameters:
eMsg- The network message type for this packet message.data- The data.- Throws:
java.io.IOException- exception while deserializing the data
-
-
Method Detail
-
getHeader
public MsgHdrProtoBuf getHeader()
Gets the header for this packet message.- Returns:
- The header.
-
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.
-
-