Interface ResponseBuilder<B extends ResponseBuilder<B,T,X>,T,X>
- Type Parameters:
B
- type of the builder (extending the base builder class)T
- type of the target object created by this builderX
- type of the entity supported by this builder (such as JsonObject, byte[])
- All Known Implementing Classes:
ApiEntityResponse.Builder
,ApiOptionalResponse.Builder
,ApiOptionalResponse.BuilderBase
,VaultOptionalResponse.Builder
,VaultOptionalResponse.BuilderBase
Response builder extracted as an interface, to work around the restriction that we cannot
have multiple inheritance in Java.
-
Method Summary
Modifier and TypeMethodDescriptionThis method is invoked byRestApi
when an entity is received.Configure the HTTP headers returned by the API call.Request ID used when dispatching this request.status
(Http.ResponseStatus status) Response status returned by the API call.
-
Method Details
-
status
Response status returned by the API call.- Parameters:
status
- HTTP status- Returns:
- updated builder
-
headers
Configure the HTTP headers returned by the API call.- Parameters:
headers
- headers- Returns:
- updated builder
-
requestId
Request ID used when dispatching this request.- Parameters:
requestId
- request id- Returns:
- updated builder
-
entity
This method is invoked byRestApi
when an entity is received.- Parameters:
entity
- entity- Returns:
- updated builder
-