Interface LogicCallCommunicationDecorator

All Superinterfaces:
CommonDecorator, LogicCommunicationDecorator
All Known Subinterfaces:
Communication, FlowContext, FlowLogicCallCommunication
All Known Implementing Classes:
DefaultCommunication, DefaultFlowContext

public interface LogicCallCommunicationDecorator extends CommonDecorator, LogicCommunicationDecorator
Decorator providing cross-logic-server synchronous and asynchronous call methods with various data type overloads.
Since:
25.1
Author:
渔民小镇
date:
2025-09-28
  • Method Details

    • call

      default Response call(RequestMessage message)
      Synchronous call using a pre-built request message. @see #call(CmdInfo, byte[])
    • call

      default Response call(CmdInfo cmdInfo, byte[] data)
      Call another logic server synchronously and return the response.
      Parameters:
      cmdInfo - the target command route
      data - the raw byte payload
      Returns:
      the response from the target logic server
    • call

      default Response call(CmdInfo cmdInfo)
      Synchronous call with no payload. @see #call(CmdInfo, byte[])
    • call

      default Response call(CmdInfo cmdInfo, int data)
      Synchronous call with int payload. @see #call(CmdInfo, byte[])
    • call

      default Response call(CmdInfo cmdInfo, long data)
      Synchronous call with long payload. @see #call(CmdInfo, byte[])
    • call

      default Response call(CmdInfo cmdInfo, boolean data)
      Synchronous call with boolean payload. @see #call(CmdInfo, byte[])
    • call

      default Response call(CmdInfo cmdInfo, String data)
      Synchronous call with String payload. @see #call(CmdInfo, byte[])
    • call

      default Response call(CmdInfo cmdInfo, Object data)
      Synchronous call with Object payload. @see #call(CmdInfo, byte[])
    • call

      default Response call(CmdInfo cmdInfo, List<?> dataList)
      Synchronous call with List payload. @see #call(CmdInfo, byte[])
    • callListInt

      default Response callListInt(CmdInfo cmdInfo, List<Integer> dataList)
      Synchronous call with List<Integer> payload. @see #call(CmdInfo, byte[])
    • callListLong

      default Response callListLong(CmdInfo cmdInfo, List<Long> dataList)
      Synchronous call with List<Long> payload. @see #call(CmdInfo, byte[])
    • callListBool

      default Response callListBool(CmdInfo cmdInfo, List<Boolean> dataList)
      Synchronous call with List<Boolean> payload. @see #call(CmdInfo, byte[])
    • callListString

      default Response callListString(CmdInfo cmdInfo, List<String> dataList)
      Synchronous call with List<String> payload. @see #call(CmdInfo, byte[])
    • callFuture

      default CompletableFuture<Response> callFuture(RequestMessage message)
      Future-based call using a pre-built request message. @see #callFuture(CmdInfo, byte[])
    • callFuture

      default CompletableFuture<Response> callFuture(CmdInfo cmdInfo, byte[] data)
      Call another logic server and return a CompletableFuture for the response.
      Parameters:
      cmdInfo - the target command route
      data - the raw byte payload
      Returns:
      a CompletableFuture that completes with the response
    • callFuture

      default CompletableFuture<Response> callFuture(CmdInfo cmdInfo)
      Future-based call with no payload. @see #callFuture(CmdInfo, byte[])
    • callFuture

      default CompletableFuture<Response> callFuture(CmdInfo cmdInfo, int data)
      Future-based call with int payload. @see #callFuture(CmdInfo, byte[])
    • callFuture

      default CompletableFuture<Response> callFuture(CmdInfo cmdInfo, long data)
      Future-based call with long payload. @see #callFuture(CmdInfo, byte[])
    • callFuture

      default CompletableFuture<Response> callFuture(CmdInfo cmdInfo, boolean data)
      Future-based call with boolean payload. @see #callFuture(CmdInfo, byte[])
    • callFuture

      default CompletableFuture<Response> callFuture(CmdInfo cmdInfo, String data)
      Future-based call with String payload. @see #callFuture(CmdInfo, byte[])
    • callFuture

      default CompletableFuture<Response> callFuture(CmdInfo cmdInfo, Object data)
      Future-based call with Object payload. @see #callFuture(CmdInfo, byte[])
    • callFuture

      default CompletableFuture<Response> callFuture(CmdInfo cmdInfo, List<?> dataList)
      Future-based call with List payload. @see #callFuture(CmdInfo, byte[])
    • callFutureListInt

      default CompletableFuture<Response> callFutureListInt(CmdInfo cmdInfo, List<Integer> dataList)
      Future-based call with List<Integer> payload. @see #callFuture(CmdInfo, byte[])
    • callFutureListLong

      default CompletableFuture<Response> callFutureListLong(CmdInfo cmdInfo, List<Long> dataList)
      Future-based call with List<Long> payload. @see #callFuture(CmdInfo, byte[])
    • callFutureListBool

      default CompletableFuture<Response> callFutureListBool(CmdInfo cmdInfo, List<Boolean> dataList)
      Future-based call with List<Boolean> payload. @see #callFuture(CmdInfo, byte[])
    • callFutureListString

      default CompletableFuture<Response> callFutureListString(CmdInfo cmdInfo, List<String> dataList)
      Future-based call with List<String> payload. @see #callFuture(CmdInfo, byte[])
    • callAsync

      default void callAsync(RequestMessage message, Consumer<Response> action)
      Async call using a pre-built request message with the current executor. @see #callAsync(CmdInfo, byte[], Consumer)
    • callAsync

      default void callAsync(RequestMessage message, Consumer<Response> action, Executor executor)
      Async call using a pre-built request message with a custom executor. @see #callAsync(CmdInfo, byte[], Consumer)
    • callAsync

      default void callAsync(CmdInfo cmdInfo, byte[] data, Consumer<Response> action)
      Call another logic server asynchronously, invoking the callback with the response.

      The callback is executed on the current flow context's executor.

      Parameters:
      cmdInfo - the target command route
      data - the raw byte payload
      action - the callback to invoke with the response
    • callAsync

      default void callAsync(CmdInfo cmdInfo, Consumer<Response> action)
      Async call with no payload. @see #callAsync(CmdInfo, byte[], Consumer)
    • callAsync

      default void callAsync(CmdInfo cmdInfo, int data, Consumer<Response> action)
      Async call with int payload. @see #callAsync(CmdInfo, byte[], Consumer)
    • callAsync

      default void callAsync(CmdInfo cmdInfo, long data, Consumer<Response> action)
      Async call with long payload. @see #callAsync(CmdInfo, byte[], Consumer)
    • callAsync

      default void callAsync(CmdInfo cmdInfo, boolean data, Consumer<Response> action)
      Async call with boolean payload. @see #callAsync(CmdInfo, byte[], Consumer)
    • callAsync

      default void callAsync(CmdInfo cmdInfo, String data, Consumer<Response> action)
      Async call with String payload. @see #callAsync(CmdInfo, byte[], Consumer)
    • callAsync

      default void callAsync(CmdInfo cmdInfo, Object data, Consumer<Response> action)
      Async call with Object payload. @see #callAsync(CmdInfo, byte[], Consumer)
    • callAsync

      default void callAsync(CmdInfo cmdInfo, List<?> dataList, Consumer<Response> action)
      Async call with List payload. @see #callAsync(CmdInfo, byte[], Consumer)
    • callAsyncListInt

      default void callAsyncListInt(CmdInfo cmdInfo, List<Integer> dataList, Consumer<Response> action)
      Async call with List<Integer> payload. @see #callAsync(CmdInfo, byte[], Consumer)
    • callAsyncListLong

      default void callAsyncListLong(CmdInfo cmdInfo, List<Long> dataList, Consumer<Response> action)
      Async call with List<Long> payload. @see #callAsync(CmdInfo, byte[], Consumer)
    • callAsyncListBool

      default void callAsyncListBool(CmdInfo cmdInfo, List<Boolean> dataList, Consumer<Response> action)
      Async call with List<Boolean> payload. @see #callAsync(CmdInfo, byte[], Consumer)
    • callAsyncListString

      default void callAsyncListString(CmdInfo cmdInfo, List<String> dataList, Consumer<Response> action)
      Async call with List<String> payload. @see #callAsync(CmdInfo, byte[], Consumer)