Class PacketClientMsg

  • All Implemented Interfaces:
    IPacketMsg

    public class PacketClientMsg
    extends java.lang.Object
    implements IPacketMsg
    Represents a packet message with extended header information.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getData()
      Gets the underlying data that represents this client message.
      EMsg getMsgType()
      Gets the network message type of this packet message.
      long getSourceJobID()
      Gets the source job id for this packet message.
      long getTargetJobID()
      Gets the target job id for this packet message.
      boolean isProto()
      Gets a value indicating whether this packet message is protobuf backed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PacketClientMsg

        public PacketClientMsg​(EMsg eMsg,
                               byte[] data)
                        throws java.io.IOException
        Initializes a new instance of the PacketClientMsg class.
        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: IPacketMsg
        Gets a value indicating whether this packet message is protobuf backed.
        Specified by:
        isProto in interface IPacketMsg
        Returns:
        true if this instance is protobuf backed; otherwise, false
      • getMsgType

        public EMsg getMsgType()
        Description copied from interface: IPacketMsg
        Gets the network message type of this packet message.
        Specified by:
        getMsgType in interface IPacketMsg
        Returns:
        The message type.
      • getTargetJobID

        public long getTargetJobID()
        Description copied from interface: IPacketMsg
        Gets the target job id for this packet message.
        Specified by:
        getTargetJobID in interface IPacketMsg
        Returns:
        The target job id.
      • getSourceJobID

        public long getSourceJobID()
        Description copied from interface: IPacketMsg
        Gets the source job id for this packet message.
        Specified by:
        getSourceJobID in interface IPacketMsg
        Returns:
        The source job id.
      • getData

        public byte[] getData()
        Description copied from interface: IPacketMsg
        Gets the underlying data that represents this client message.
        Specified by:
        getData in interface IPacketMsg
        Returns:
        The data.