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 Summary
Modifier and TypeMethodDescriptiondefault RequestMessageofRequestMessage(CmdInfo cmdInfo, boolean data) Create aRequestMessagewith abooleanpayload.ofRequestMessage(CmdInfo cmdInfo, byte[] dataBytes) Create aRequestMessagewith raw byte-array data for the given command.default RequestMessageofRequestMessage(CmdInfo cmdInfo, int data) Create aRequestMessagewith anintpayload.default RequestMessageofRequestMessage(CmdInfo cmdInfo, long data) Create aRequestMessagewith alongpayload.default RequestMessageofRequestMessage(CmdInfo cmdInfo, Object data) Create aRequestMessagewith a business object payload.default RequestMessageofRequestMessage(CmdInfo cmdInfo, String data) Create aRequestMessagewith aStringpayload.default RequestMessageofRequestMessage(CmdInfo cmdInfo, List<?> dataList) Create aRequestMessagewith a list of business objects as payload.default RequestMessageofRequestMessageListBool(CmdInfo cmdInfo, List<Boolean> dataList) Create aRequestMessagewith a list ofBooleanvalues as payload.default RequestMessageofRequestMessageListInt(CmdInfo cmdInfo, List<Integer> dataList) Create aRequestMessagewith a list ofIntegervalues as payload.default RequestMessageofRequestMessageListLong(CmdInfo cmdInfo, List<Long> dataList) Create aRequestMessagewith a list ofLongvalues as payload.default RequestMessageofRequestMessageListString(CmdInfo cmdInfo, List<String> dataList) Create aRequestMessagewith a list ofStringvalues as payload.
-
Method Details
-
ofRequestMessage
Create aRequestMessagewith raw byte-array data for the given command.- Parameters:
cmdInfo- the command routing informationdataBytes- the serialized request data- Returns:
- a new request message
-
ofRequestMessage
Create aRequestMessagewith anintpayload.- Parameters:
cmdInfo- the command routing informationdata- the integer payload- Returns:
- a new request message
-
ofRequestMessage
Create aRequestMessagewith alongpayload.- Parameters:
cmdInfo- the command routing informationdata- the long payload- Returns:
- a new request message
-
ofRequestMessage
Create aRequestMessagewith abooleanpayload.- Parameters:
cmdInfo- the command routing informationdata- the boolean payload- Returns:
- a new request message
-
ofRequestMessage
Create aRequestMessagewith aStringpayload.- Parameters:
cmdInfo- the command routing informationdata- the string payload- Returns:
- a new request message
-
ofRequestMessage
Create aRequestMessagewith a business object payload.- Parameters:
cmdInfo- the command routing informationdata- the business data object- Returns:
- a new request message
-
ofRequestMessage
Create aRequestMessagewith a list of business objects as payload.- Parameters:
cmdInfo- the command routing informationdataList- the list of business objects- Returns:
- a new request message
-
ofRequestMessageListInt
Create aRequestMessagewith a list ofIntegervalues as payload.- Parameters:
cmdInfo- the command routing informationdataList- the list of integer values- Returns:
- a new request message
-
ofRequestMessageListLong
Create aRequestMessagewith a list ofLongvalues as payload.- Parameters:
cmdInfo- the command routing informationdataList- the list of long values- Returns:
- a new request message
-
ofRequestMessageListBool
Create aRequestMessagewith a list ofBooleanvalues as payload.- Parameters:
cmdInfo- the command routing informationdataList- the list of boolean values- Returns:
- a new request message
-
ofRequestMessageListString
Create aRequestMessagewith a list ofStringvalues as payload.- Parameters:
cmdInfo- the command routing informationdataList- the list of string values- Returns:
- a new request message
-