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(@Nullable 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 null should be passed.
    • onError

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