Class ObjectResponse<T>
java.lang.Object
io.getlime.core.rest.model.base.response.Response
io.getlime.core.rest.model.base.response.ObjectResponse<T>
- Type Parameters:
T- Type of the response object
- Direct Known Subclasses:
ErrorResponse
public class ObjectResponse<T> extends Response
Generic response with status and object object of a custom class.
- Author:
- Petr Dvorak, petr@wultra.com
-
Nested Class Summary
Nested classes/interfaces inherited from class io.getlime.core.rest.model.base.response.Response
Response.Status -
Field Summary
-
Constructor Summary
Constructors Constructor Description ObjectResponse()Default constructorObjectResponse(java.lang.String status, T responseObject)Constructor with response status and response objectObjectResponse(T responseObject)Constructor with OK response status and response object -
Method Summary
Modifier and Type Method Description TgetResponseObject()Get response object.java.lang.StringgetStatus()Get response status.voidsetResponseObject(T responseObject)Set response object.voidsetStatus(java.lang.String status)Set response status.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ObjectResponse
public ObjectResponse()Default constructor -
ObjectResponse
Constructor with OK response status and response object- Parameters:
responseObject- Response object.
-
ObjectResponse
Constructor with response status and response object- Parameters:
status- Response status, use static constant fromResponse.Statusclass.responseObject- Response object.
-
-
Method Details
-
getStatus
public java.lang.String getStatus()Get response status. -
setStatus
public void setStatus(java.lang.String status)Set response status. -
getResponseObject
Get response object.- Returns:
- Response object.
-
setResponseObject
Set response object.- Parameters:
responseObject- Response object.
-