Class ServiceClient.Response<T>

java.lang.Object
org.ojalgo.netio.ServiceClient.Response<T>
All Implemented Interfaces:
BasicLogger.Printable
Enclosing class:
ServiceClient

public static final class ServiceClient.Response<T> extends Object implements BasicLogger.Printable
This is actually a wrapper of a future response. The only things you can do without waiting/blocking for the actual response is isDone() and cancel().
  • Field Details

  • Constructor Details

  • Method Details

    • cancel

      public boolean cancel()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getBody

      public T getBody()
    • getHeaders

      public HttpHeaders getHeaders()
    • getPreviousResponse

      public Optional<HttpResponse<T>> getPreviousResponse()
    • getRequest

      public HttpRequest getRequest()
      Will recreate the request that resulted in the final response. If there has been one or more redirects, then this is NOT the same as the original request.
    • getStatusCode

      public int getStatusCode()
      Returns:
      The http response status code, or -1 if this is not http/hhtps or if the code cannot be discerned from the response
    • getURI

      public URI getURI()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • isDone

      public boolean isDone()
    • isResponseOK

      public boolean isResponseOK()
      Returns:
      true if the status (response) code is in [200,300)
    • print

      public void print(BasicLogger receiver)
      Specified by:
      print in interface BasicLogger.Printable
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getResponse

      HttpResponse<T> getResponse()