Interface Response<C extends AbstractConnector<?>>

Type Parameters:
C - connector implementation
All Known Implementing Classes:
ResponseImpl

public interface Response<C extends AbstractConnector<?>>
This interface describes a response to a request. A response to request can be for example a change of value, an error, ...
Author:
igor@scictrl.com
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the source of the response, same as in associated Request.
    If result of the request is an error this method will return it.
    Poop<?,?>
    Returns the condition of the response
    Returns Request object, which initiated this response.
    Optional identification tag of the response.
    boolean
    Returns true if this is last response in series of responses.
    boolean
    Returns true if the request was successfully completed.
  • Method Details

    • getRequest

      Request<C> getRequest()
      Returns Request object, which initiated this response.
      Returns:
      initial Request
    • isLast

      boolean isLast()
      Returns true if this is last response in series of responses.
      Returns:
      true if it is last response
    • isSuccess

      boolean isSuccess()
      Returns true if the request was successfully completed.
      Returns:
      returns true if response is a success
    • getTag

      Object getTag()
      Optional identification tag of the response. Interpretation depends on asynchronus methods which generated this response.
      Returns:
      identification tag.
    • getError

      Exception getError()
      If result of the request is an error this method will return it. Otherwise it will return null
      Returns:
      error
    • getConnection

      Connection<C,?,?> getConnection()
      Returns the source of the response, same as in associated Request.
      Returns:
      response source
    • getPoop

      Poop<?,?> getPoop()
      Returns the condition of the response
      Returns:
      response condition