Interface ResponseListener


public interface ResponseListener
The listener interface for receiving ResponseData and ResponseError objects. Implementations of this interface get notified when the device responses to a request or an error occurred.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when an error occurred while processing the request.
    void
    Called when the request is calling a notification.
    void
    Called when the request was successfully processed and the result is available.
  • Method Details

    • onResponse

      void onResponse(ResponseData response)
      Called when the request was successfully processed and the result is available.

      Note: If you get a ResponseData object that contains no BlukiiDataItem (response.getData() == null) the request was nevertheless successful, but there is no data to return. You will get errors always via onError(ResponseError)

      Parameters:
      response - the ResponseData object
    • onNotify

      void onNotify(ResponseData response)
      Called when the request is calling a notification.

      A BlukiiAction only supports Notifications if BlukiiAction.isNotify() is true

      Parameters:
      response - the ResponseData object
    • onError

      void onError(ResponseError error)
      Called when an error occurred while processing the request.
      Parameters:
      error - the ResponseError object