net.degreedays.api
Class FailureResponse

java.lang.Object
  extended by net.degreedays.api.Response
      extended by net.degreedays.api.FailureResponse
All Implemented Interfaces:
java.io.Serializable

public final class FailureResponse
extends Response
implements java.io.Serializable

A type of API 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.


Nested Class Summary
static class FailureResponse.Builder
          A builder class for creating immutable FailureResponse objects e.g. for testing purposes.
 
Method Summary
 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.
 
Methods inherited from class net.degreedays.api.Response
metadata
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

failure

public Failure failure()
Returns the non-null Failure object that contains details of the failure in the API's server-side processing of the request.


equals

public 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).

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overridden to ensure consistency with equals.

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Returns a non-null, non-empty string representation of this object for logging and debugging purposes.

The exact details of the representation are unspecified and subject to change.

Overrides:
toString in class java.lang.Object


www.degreedays.net/api/