Interface BrokerCommandCallback


public interface BrokerCommandCallback
This interface provides a way to pass a logic which is run after the specific command was invoked. The logic is invoked by running onResponse(java.util.Map<java.lang.String, java.lang.Object>) when command's response arrives or there was an issue during invocation so onFailure(java.util.Map<java.lang.String, java.lang.Object>) is run.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Whenever any issue occurs during command invocation it will be passed here as an instance of Throwable.
    void
    When a command response arrive this method is invoked and it should contain continuation logic for the command.
  • Method Details

    • onResponse

      void onResponse(Map<String,Object> response)
      When a command response arrive this method is invoked and it should contain continuation logic for the command.
      Parameters:
      response - - Map containing response where we optionally provide status key. It is provided when an an issue occurred on the server side.
    • onFailure

      void onFailure(Map<String,Object> response)
      Whenever any issue occurs during command invocation it will be passed here as an instance of Throwable.
      Parameters:
      response - - Map containing error response where we optionally provide status key. It is provided when an issue occurred on the server side.