Interface RemoteMessage

All Superinterfaces:
FutureMessage
All Known Subinterfaces:
CommunicationMessage, Request, Response
All Known Implementing Classes:
AbstractCommunicationMessage, CommonMessage, ExternalMessage, RequestMessage, ResponseMessage, SendMessage, UserRequestMessage, UserResponseMessage

public interface RemoteMessage extends FutureMessage
Contract for messages transmitted between servers in the ionet cluster.

Extends FutureMessage and defines the common wire-level fields shared by all inter-server messages: the merged command route key, trace ID for distributed tracing, server routing IDs (external, logic, source), network identifier, serialized payload, error output, and nanosecond-precision timing.

Since:
25.1
Author:
渔民小镇
date:
2025-09-15
  • Method Summary

    Modifier and Type
    Method
    Description
    Derive the CmdInfo route descriptor from the merged command key.
    int
    Get the merged command route key (cmd + subCmd packed into a single int).
    byte[]
    Get the serialized payload data.
    int
    Get the ID of the external server that originated or will receive this message.
    int
    Get the ID of the logic server handling this message.
    long
    Get the nanosecond timestamp recorded when this message was created or received.
    int
    Get the network-level identifier.
    int
    Get the ID of the server that originally created this message.
    Get the distributed trace ID for this message.
    void
    Set the command route from a CmdInfo descriptor.
    void
    setCmdMerge(int cmdMerge)
    Set the merged command route key.
    void
    setData(byte[] data)
    Set the serialized payload data.
    void
    setExternalServerId(int externalServerId)
    Set the ID of the external server.
    void
    setLogicServerId(int logicServerId)
    Set the ID of the logic server handling this message.
    void
    setNanoTime(long nanoTime)
    Set the nanosecond timestamp for this message.
    void
    setNetId(int netId)
    Set the network-level identifier.
    void
    Set the error information to be included in the response.
    void
    setSourceServerId(int sourceServerId)
    Set the ID of the server that originally created this message.
    void
    setTraceId(String traceId)
    Set the distributed trace ID for this message.

    Methods inherited from interface FutureMessage

    getFutureId, setFutureId
  • Method Details

    • getCmdMerge

      int getCmdMerge()
      Get the merged command route key (cmd + subCmd packed into a single int).
      Returns:
      the merged command key
    • setCmdMerge

      void setCmdMerge(int cmdMerge)
      Set the merged command route key.
      Parameters:
      cmdMerge - the merged command key
    • getTraceId

      String getTraceId()
      Get the distributed trace ID for this message.
      Returns:
      the trace ID, or null if not set
    • setTraceId

      void setTraceId(String traceId)
      Set the distributed trace ID for this message.
      Parameters:
      traceId - the trace ID
    • getExternalServerId

      int getExternalServerId()
      Get the ID of the external server that originated or will receive this message.
      Returns:
      the external server ID
    • setExternalServerId

      void setExternalServerId(int externalServerId)
      Set the ID of the external server.
      Parameters:
      externalServerId - the external server ID
    • getLogicServerId

      int getLogicServerId()
      Get the ID of the logic server handling this message.
      Returns:
      the logic server ID
    • setLogicServerId

      void setLogicServerId(int logicServerId)
      Set the ID of the logic server handling this message.
      Parameters:
      logicServerId - the logic server ID
    • getSourceServerId

      int getSourceServerId()
      Get the ID of the server that originally created this message.
      Returns:
      the source server ID
    • setSourceServerId

      void setSourceServerId(int sourceServerId)
      Set the ID of the server that originally created this message.
      Parameters:
      sourceServerId - the source server ID
    • getNetId

      int getNetId()
      Get the network-level identifier.
      Returns:
      the net ID
    • setNetId

      void setNetId(int netId)
      Set the network-level identifier.
      Parameters:
      netId - the net ID
    • getData

      byte[] getData()
      Get the serialized payload data.
      Returns:
      the payload byte array
    • setData

      void setData(byte[] data)
      Set the serialized payload data.
      Parameters:
      data - the payload byte array
    • setCmdInfo

      void setCmdInfo(CmdInfo cmdInfo)
      Set the command route from a CmdInfo descriptor.
      Parameters:
      cmdInfo - the command info containing the merged route key
    • getCmdInfo

      CmdInfo getCmdInfo()
      Derive the CmdInfo route descriptor from the merged command key.
      Returns:
      the command info
    • setOutputError

      void setOutputError(ErrorInformation error)
      Set the error information to be included in the response.
      Parameters:
      error - the error information
    • getNanoTime

      long getNanoTime()
      Get the nanosecond timestamp recorded when this message was created or received.
      Returns:
      the nano time
    • setNanoTime

      void setNanoTime(long nanoTime)
      Set the nanosecond timestamp for this message.
      Parameters:
      nanoTime - the nano time