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 correlationId, BaseResponse.ResponseStatus responseStatus, List<Error> error) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()booleanThe application client Id.A text to correlate the request across the system.getError()The list of errors.The status of the response.inthashCode()voidsetAdditionalProperty(String name, Object value) voidsetClientId(String clientId) The application client Id.voidsetCorrelationId(String correlationId) A text to correlate the request across the system.voidThe list of errors.voidsetResponseStatus(BaseResponse.ResponseStatus responseStatus) The status of the response.toString()
-
Constructor Details
-
BaseResponse
public BaseResponse()No args constructor for use in serialization -
BaseResponse
public BaseResponse(String clientId, String correlationId, BaseResponse.ResponseStatus responseStatus, List<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.correlationId- A text to correlate the request across the system.responseStatus- The status of the response.error- The list of errors.
-
-
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) -
getCorrelationId
A text to correlate the request across the system. (Required) -
setCorrelationId
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 list of errors. -
setError
The list of errors. -
getAdditionalProperties
-
setAdditionalProperty
-
toString
-
hashCode
public int hashCode() -
equals
-