Package org.ojalgo.netio
Class ServiceClient.Response<T>
java.lang.Object
org.ojalgo.netio.ServiceClient.Response<T>
- All Implemented Interfaces:
BasicLogger.Printable
- Enclosing class:
ServiceClient
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CompletableFuture
<HttpResponse<T>> private final ServiceClient.Session
-
Constructor Summary
ConstructorsConstructorDescriptionResponse
(ServiceClient.Request request, CompletableFuture<HttpResponse<T>> response) -
Method Summary
Modifier and TypeMethodDescriptionboolean
cancel()
boolean
getBody()
Will recreate the request that resulted in the final response.(package private) HttpResponse
<T> int
getURI()
int
hashCode()
boolean
isDone()
boolean
void
print
(BasicLogger receiver) toString()
-
Field Details
-
myFutureResponse
-
mySession
-
-
Constructor Details
-
Response
Response(ServiceClient.Request request, CompletableFuture<HttpResponse<T>> response)
-
-
Method Details
-
cancel
public boolean cancel() -
equals
-
getBody
-
getHeaders
-
getPreviousResponse
-
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
-
hashCode
public int hashCode() -
isDone
public boolean isDone() -
isResponseOK
public boolean isResponseOK()- Returns:
- true if the status (response) code is in [200,300)
-
print
- Specified by:
print
in interfaceBasicLogger.Printable
-
toString
-
getResponse
HttpResponse<T> getResponse()
-