public final class FailureResponse extends Response implements java.io.Serializable
Response
that indicates a failure in the server-side
processing of a Request
.
You will probably only need to deal with this class directly if you are
working directly with the RequestProcessor
interface. If you use
DegreeDaysApi
instead, any FailureResponse
objects will
be turned into RequestFailureException
objects automatically.
Instances of this class are immutable. You can safely reuse them and call them from multiple threads at once.
Modifier and Type | Class and Description |
---|---|
static class |
FailureResponse.Builder
A builder class for creating immutable
FailureResponse objects
e.g. for testing purposes. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Returns
true if o is a
FailureResponse with an equal failure()
(the metadata() is not considered in the equality
test). |
Failure |
failure()
Returns the non-null
Failure object that contains details
of the failure in the API's server-side processing of the request. |
int |
hashCode()
Overridden to ensure consistency with
equals . |
java.lang.String |
toString()
Returns a non-null, non-empty string representation of this object for logging and debugging purposes.
|
public Failure failure()
Failure
object that contains details
of the failure in the API's server-side processing of the request.public boolean equals(java.lang.Object o)
true
if o
is a
FailureResponse
with an equal failure()
(the metadata()
is not considered in the equality
test).equals
in class java.lang.Object
public int hashCode()
equals
.hashCode
in class java.lang.Object
public java.lang.String toString()
The exact details of the representation are unspecified and subject to change.
toString
in class java.lang.Object
See www.degreedays.net/api/ for more about the Degree Days.net API.
You can sign up for a Degree Days.net API account and read the integration guide that is useful and applicable whether you are using Java or not.