Interface LogicCommunicationDecorator

All Known Subinterfaces:
Communication, FlowContext, FlowLogicCallCollectCommunication, FlowLogicCallCommunication, LogicCallCollectCommunicationDecorator, LogicCallCommunicationDecorator
All Known Implementing Classes:
DefaultCommunication, DefaultFlowContext

public interface LogicCommunicationDecorator
Decorator interface that provides convenience factory methods for creating RequestMessage instances with various data types.

Each overload encodes the given data using the internal DataCodec before delegating to the core ofRequestMessage(CmdInfo, byte[]) method. This eliminates repetitive codec lookup and encoding boilerplate in calling code.

Since:
25.1
Author:
渔民小镇
date:
2025-10-09
  • Method Details

    • ofRequestMessage

      RequestMessage ofRequestMessage(CmdInfo cmdInfo, byte[] dataBytes)
      Create a RequestMessage with raw byte-array data for the given command.
      Parameters:
      cmdInfo - the command routing information
      dataBytes - the serialized request data
      Returns:
      a new request message
    • ofRequestMessage

      default RequestMessage ofRequestMessage(CmdInfo cmdInfo, int data)
      Create a RequestMessage with an int payload.
      Parameters:
      cmdInfo - the command routing information
      data - the integer payload
      Returns:
      a new request message
    • ofRequestMessage

      default RequestMessage ofRequestMessage(CmdInfo cmdInfo, long data)
      Create a RequestMessage with a long payload.
      Parameters:
      cmdInfo - the command routing information
      data - the long payload
      Returns:
      a new request message
    • ofRequestMessage

      default RequestMessage ofRequestMessage(CmdInfo cmdInfo, boolean data)
      Create a RequestMessage with a boolean payload.
      Parameters:
      cmdInfo - the command routing information
      data - the boolean payload
      Returns:
      a new request message
    • ofRequestMessage

      default RequestMessage ofRequestMessage(CmdInfo cmdInfo, String data)
      Create a RequestMessage with a String payload.
      Parameters:
      cmdInfo - the command routing information
      data - the string payload
      Returns:
      a new request message
    • ofRequestMessage

      default RequestMessage ofRequestMessage(CmdInfo cmdInfo, Object data)
      Create a RequestMessage with a business object payload.
      Parameters:
      cmdInfo - the command routing information
      data - the business data object
      Returns:
      a new request message
    • ofRequestMessage

      default RequestMessage ofRequestMessage(CmdInfo cmdInfo, List<?> dataList)
      Create a RequestMessage with a list of business objects as payload.
      Parameters:
      cmdInfo - the command routing information
      dataList - the list of business objects
      Returns:
      a new request message
    • ofRequestMessageListInt

      default RequestMessage ofRequestMessageListInt(CmdInfo cmdInfo, List<Integer> dataList)
      Create a RequestMessage with a list of Integer values as payload.
      Parameters:
      cmdInfo - the command routing information
      dataList - the list of integer values
      Returns:
      a new request message
    • ofRequestMessageListLong

      default RequestMessage ofRequestMessageListLong(CmdInfo cmdInfo, List<Long> dataList)
      Create a RequestMessage with a list of Long values as payload.
      Parameters:
      cmdInfo - the command routing information
      dataList - the list of long values
      Returns:
      a new request message
    • ofRequestMessageListBool

      default RequestMessage ofRequestMessageListBool(CmdInfo cmdInfo, List<Boolean> dataList)
      Create a RequestMessage with a list of Boolean values as payload.
      Parameters:
      cmdInfo - the command routing information
      dataList - the list of boolean values
      Returns:
      a new request message
    • ofRequestMessageListString

      default RequestMessage ofRequestMessageListString(CmdInfo cmdInfo, List<String> dataList)
      Create a RequestMessage with a list of String values as payload.
      Parameters:
      cmdInfo - the command routing information
      dataList - the list of string values
      Returns:
      a new request message