Interface CommandBusConnector.ResultCallback

Enclosing interface:
CommandBusConnector

public static interface CommandBusConnector.ResultCallback
A callback interface for handling the result of command processing. It provides methods to indicate success or failure of command handling.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when an error occurs during command processing.
    void
    Called when the command processing is successful.
  • Method Details

    • onSuccess

      void onSuccess(CommandResultMessage resultMessage)
      Called when the command processing is successful.
      Parameters:
      resultMessage - the result message containing the outcome of the command processing. If the message handling yielded no result message, a CommandResultMessage with a null Message.payload() is expected
    • onError

      void onError(Throwable cause)
      Called when an error occurs during command processing.
      Parameters:
      cause - the exception that caused the error