Package com.rubensgomes.reqresp
Class BaseResponse
java.lang.Object
com.rubensgomes.reqresp.BaseResponse
Base Response Object
A base type that should be part of all microservice responses.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic enumThe status of the response. -
Constructor Summary
ConstructorsConstructorDescriptionNo args constructor for use in serializationBaseResponse(String clientId, String transactionId, BaseResponse.ResponseStatus responseStatus, Error error) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()booleanThe application client Id.getError()The error object.The status of the response.A text to correlate the request across the system.inthashCode()voidsetAdditionalProperty(String name, Object value) voidsetClientId(String clientId) The application client Id.voidThe error object.voidsetResponseStatus(BaseResponse.ResponseStatus responseStatus) The status of the response.voidsetTransactionId(String transactionId) A text to correlate the request across the system.toString()
-
Constructor Details
-
BaseResponse
public BaseResponse()No args constructor for use in serialization -
BaseResponse
public BaseResponse(String clientId, String transactionId, BaseResponse.ResponseStatus responseStatus, Error error) - Parameters:
clientId- The application client Id. Notice that this is not the ID of the consumer, but of actual client that initiated the system request.responseStatus- The status of the response.error- The error object.transactionId- A text to correlate the request across the system.
-
-
Method Details
-
builder
-
getClientId
The application client Id. Notice that this is not the ID of the consumer, but of actual client that initiated the system request. (Required) -
setClientId
The application client Id. Notice that this is not the ID of the consumer, but of actual client that initiated the system request. (Required) -
getTransactionId
A text to correlate the request across the system. (Required) -
setTransactionId
A text to correlate the request across the system. (Required) -
getResponseStatus
The status of the response. (Required) -
setResponseStatus
The status of the response. (Required) -
getError
The error object. -
setError
The error object. -
getAdditionalProperties
-
setAdditionalProperty
-
toString
-
hashCode
public int hashCode() -
equals
-