Interface TaskListener<Response>

All Known Implementing Classes:
LoggingTaskListener

public interface TaskListener<Response>
Listener for Task success or failure.
  • Method Summary

    Modifier and Type Method Description
    void onFailure​(Task task, java.lang.Exception e)
    A failure caused by an exception at some phase of the task.
    void onResponse​(Task task, Response response)
    Handle task response.
  • Method Details

    • onResponse

      void onResponse​(Task task, Response response)
      Handle task response. This response may constitute a failure or a success but it is up to the listener to make that decision.
      Parameters:
      task - the task being executed. May be null if the action doesn't create a task
      response - the response from the action that executed the task
    • onFailure

      void onFailure​(Task task, java.lang.Exception e)
      A failure caused by an exception at some phase of the task.
      Parameters:
      task - the task being executed. May be null if the action doesn't create a task
      e - the failure