Class CommonMessage

java.lang.Object
com.iohao.net.framework.protocol.CommonMessage
All Implemented Interfaces:
FutureMessage, RemoteMessage
Direct Known Subclasses:
RequestMessage, ResponseMessage, UserRequestMessage, UserResponseMessage

public class CommonMessage extends Object implements RemoteMessage
Base class for internal messages exchanged between logic servers via Aeron.

Carries the common fields shared by all internal message types: the merged command route key (cmdMerge), trace identifier, server routing IDs (external, logic, source), network identifier, timing information, serialized payload data, and an optional error output. Subclasses extend this to add request- or response-specific fields.

Since:
25.1
Author:
渔民小镇
date:
2025-09-15
  • Constructor Details

    • CommonMessage

      public CommonMessage()
  • Method Details

    • setCmdInfo

      public void setCmdInfo(CmdInfo cmdInfo)
      Set the command route from a CmdInfo descriptor.
      Specified by:
      setCmdInfo in interface RemoteMessage
      Parameters:
      cmdInfo - the command info containing the merged route key
    • getCmdInfo

      public CmdInfo getCmdInfo()
      Derive the CmdInfo route descriptor from the merged command key.
      Specified by:
      getCmdInfo in interface RemoteMessage
      Returns:
      the command info