Package com.blukii.sdk.config
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 TypeMethodDescriptionvoid
onError
(ResponseError error) Called when an error occurred while processing the request.void
onNotify
(ResponseData response) Called when the request is calling a notification.void
onResponse
(ResponseData response) Called when the request was successfully processed and the result is available.
-
Method Details
-
onResponse
Called when the request was successfully processed and the result is available.Note: If you get a
ResponseData
object that contains noBlukiiDataItem (response.getData() == null)
the request was nevertheless successful, but there is no data to return. You will get errors always viaonError(ResponseError)
- Parameters:
response
- theResponseData
object
-
onNotify
Called when the request is calling a notification.A
BlukiiAction
only supports Notifications ifBlukiiAction.isNotify()
is true- Parameters:
response
- theResponseData
object
-
onError
Called when an error occurred while processing the request.- Parameters:
error
- theResponseError
object
-