Interface IPacketMsg

  • All Known Implementing Classes:
    PacketClientMsg, PacketClientMsgProtobuf, PacketMsg

    public interface IPacketMsg
    Represents a simple unified interface into client messages recieved from the network. This is contrasted with IClientMsg in that this interface is packet body agnostic and only allows simple access into the header. This interface is also immutable, and the underlying data cannot be modified.
    • Method Summary

      All Methods Instance Methods Abstract 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.
    • Method Detail

      • isProto

        boolean isProto()
        Gets a value indicating whether this packet message is protobuf backed.
        Returns:
        true if this instance is protobuf backed; otherwise, false
      • getMsgType

        EMsg getMsgType()
        Gets the network message type of this packet message.
        Returns:
        The message type.
      • getTargetJobID

        long getTargetJobID()
        Gets the target job id for this packet message.
        Returns:
        The target job id.
      • getSourceJobID

        long getSourceJobID()
        Gets the source job id for this packet message.
        Returns:
        The source job id.
      • getData

        byte[] getData()
        Gets the underlying data that represents this client message.
        Returns:
        The data.