Class Response<T>
java.lang.Object
org.gbif.api.model.common.messaging.Response<T>
- Direct Known Subclasses:
ResponseChain
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for Response objects.static enumstatic enum -
Constructor Summary
ConstructorsConstructorDescriptionResponse()Response(Response.Status status) Constructor using status only.Response(Response.Status status, String messageKey) Response(Response.Status status, T content, String messageKey) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidsetContent(T content) voidsetMessage(String message) voidsetMessageKey(String messageKey) voidsetRootException(Throwable rootException) Sets the root exception when is error response.voidsetStatus(Response.Status status) voidsetStatusCode(Integer statusCode) toString()
-
Constructor Details
-
Response
public Response() -
Response
-
Response
Constructor using status only. -
Response
-
Response
-
-
Method Details
-
getContent
- Returns:
- the content
-
setContent
- Parameters:
content- the content to set
-
getMessage
- Returns:
- the message
-
setMessage
- Parameters:
message- the message to set
-
getMessageKey
- Returns:
- the messageKey
-
setMessageKey
- Parameters:
messageKey- the messageKey to set
-
getRootException
- Returns:
- rootException when the response contains an error
-
setRootException
Sets the root exception when is error response. -
getStatus
- Returns:
- the status
-
setStatus
- Parameters:
status- the status to set
-
getStatusCode
- Returns:
- the statusCode
-
setStatusCode
- Parameters:
statusCode- the statusCode to set
-
copyTo
-
statusReason
-
toString
-