ittp.protocol.response
Class Response.Code
java.lang.Object
java.util.AbstractMap
java.util.HashMap
ittp.protocol.response.Response.Code
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Map, java.io.Serializable
- Enclosing class:
- Response
- public class Response.Code
- extends java.util.HashMap
This class allow to know the state of the response.
It allows also to declare the different number of response code.
- See Also:
- Serialized Form
Nested classes inherited from class java.util.HashMap |
|
Nested classes inherited from class java.util.AbstractMap |
|
Fields inherited from class java.util.HashMap |
|
Fields inherited from class java.util.AbstractMap |
|
Method Summary |
(package private) int |
getResponseCode()
Accessors that allows to return the code of the state of the response. |
void |
setResponseCode(int response_code)
Mutators for the response_code.
|
java.lang.String |
toString()
Accessors that allows to return the code and the message of the state of the response. |
Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
equals, hashCode |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals, hashCode |
ITTP_OK
public static final int ITTP_OK
- See Also:
- Constant Field Values
ITTP_PARTIAL
public static final int ITTP_PARTIAL
- See Also:
- Constant Field Values
ITTP_NOT_MODIFIED
public static final int ITTP_NOT_MODIFIED
- See Also:
- Constant Field Values
ITTP_BAD_REQUEST
public static final int ITTP_BAD_REQUEST
- See Also:
- Constant Field Values
ITTP_NOT_FOUND
public static final int ITTP_NOT_FOUND
- See Also:
- Constant Field Values
ITTP_METHOD_NOT_ALLOWED
public static final int ITTP_METHOD_NOT_ALLOWED
- See Also:
- Constant Field Values
ITTP_OUT_OF_RANGE
public static final int ITTP_OUT_OF_RANGE
- See Also:
- Constant Field Values
ITTP_INTERNAL_ERROR
public static final int ITTP_INTERNAL_ERROR
- See Also:
- Constant Field Values
ITTP_NOT_IMPLEMENTED
public static final int ITTP_NOT_IMPLEMENTED
- See Also:
- Constant Field Values
ITTP_UNAVAILABLE
public static final int ITTP_UNAVAILABLE
- See Also:
- Constant Field Values
ITTP_VERSION
public static final int ITTP_VERSION
- See Also:
- Constant Field Values
Response.Code
public Response.Code()
- Constructor of the class.
It associate each code to a corresponding error message.
setResponseCode
public void setResponseCode(int response_code)
- Mutators for the response_code.
If the code is superior to 400, then it is register like an error.
- Parameters:
response_code
- int containing the number of the error code.
getResponseCode
int getResponseCode()
- Accessors that allows to return the code of the state of the response.
- Returns:
- the response code.
toString
public java.lang.String toString()
- Accessors that allows to return the code and the message of the state of the response.
- Returns:
- the error message that the clieant will receive.