Package org.eclipse.steady.backend
Class HttpResponse
- java.lang.Object
-
- org.eclipse.steady.backend.HttpResponse
-
public class HttpResponse extends Object
Http response of the RESTful API of the backend.
-
-
Constructor Summary
Constructors Constructor Description HttpResponse(int _status)Creates a response with the given status but without body.HttpResponse(int _status, String _body)Creates a response with the given status and body.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBody()Getter for the fieldbody.intgetStatus()Getter for the fieldstatus.booleanhasBody()hasBody.booleanisCreated()isCreated.booleanisNotFound()isNotFound.booleanisOk()isOk.booleanisServerError()isServerError.booleanisServiceUnavailable()isServiceUnavailable.voidsetBody(String _body)Setter for the fieldbody.StringtoString()toString.
-
-
-
Method Detail
-
getStatus
public int getStatus()
Getter for the field
status.- Returns:
- a int.
-
isNotFound
public boolean isNotFound()
isNotFound.
- Returns:
- a boolean.
-
isOk
public boolean isOk()
isOk.
- Returns:
- a boolean.
-
isCreated
public boolean isCreated()
isCreated.
- Returns:
- a boolean.
-
isServerError
public boolean isServerError()
isServerError.
- Returns:
- a boolean.
-
isServiceUnavailable
public boolean isServiceUnavailable()
isServiceUnavailable.
- Returns:
- a boolean.
-
setBody
public void setBody(String _body)
Setter for the field
body.- Parameters:
_body- aStringobject.
-
hasBody
public boolean hasBody()
hasBody.
- Returns:
- a boolean.
-
-