Class Response
- java.lang.Object
-
- org.palladiosimulator.protocom.framework.java.ee.protocol.Response
-
- Direct Known Subclasses:
JsonResponse
,StringResponse
public class Response extends Object
A Response object represents an HTTP response.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getError()
Gets the error code of the response.void
setError(int error)
Sets the error code of the response.String
toJson()
Converts the response to JSON.
-
-
-
Field Detail
-
OK
public static final int OK
- See Also:
- Constant Field Values
-
ALREADY_EXISTS
public static final int ALREADY_EXISTS
- See Also:
- Constant Field Values
-
INVALID
public static final int INVALID
- See Also:
- Constant Field Values
-
FAILED
public static final int FAILED
- See Also:
- Constant Field Values
-
MAPPER
protected static final com.fasterxml.jackson.databind.ObjectMapper MAPPER
-
error
protected int error
-
-
Method Detail
-
getError
public int getError()
Gets the error code of the response.- Returns:
- the error code of the response
-
setError
public void setError(int error)
Sets the error code of the response.- Parameters:
error
- the error code of the response
-
toJson
public String toJson()
Converts the response to JSON.- Returns:
- a JSON object string representing the response
-
-