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
public interface ResponseBuilder<B extends ResponseBuilder<B,T,X>,T,X> extends Builder<T>
Response builder extracted as an interface, to work around the restriction that we cannot have multiple inheritance in Java.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description B
entity(X entity)
This method is invoked byRestApi
when an entity is received.B
headers(Headers headers)
Configure the HTTP headers returned by the API call.B
requestId(String requestId)
Request ID used when dispatching this request.B
status(Http.ResponseStatus status)
Response status returned by the API call.
-
-
-
Method Detail
-
status
B status(Http.ResponseStatus status)
Response status returned by the API call.- Parameters:
status
- HTTP status- Returns:
- updated builder
-
headers
B headers(Headers headers)
Configure the HTTP headers returned by the API call.- Parameters:
headers
- headers- Returns:
- updated builder
-
requestId
B requestId(String requestId)
Request ID used when dispatching this request.- Parameters:
requestId
- request id- Returns:
- updated builder
-
-