Class ApiResponse.Builder<B extends ApiResponse.Builder<B,T>,T extends ApiResponse>
java.lang.Object
io.helidon.integrations.common.rest.ApiResponse.Builder<B,T>
- Type Parameters:
B
- type of the builderT
- type of api response
- Direct Known Subclasses:
ApiEntityResponse.Builder
,ApiOptionalResponse.BuilderBase
- Enclosing class:
- ApiResponse
public abstract static class ApiResponse.Builder<B extends ApiResponse.Builder<B,T>,T extends ApiResponse>
extends Object
implements Builder<B,T>
Abstract fluent API builder to build subclasses of
ApiResponse
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionheaders()
Received HTTP headers.Configure the HTTP headers returned by the API call.protected B
me()
Can be returned by subclasses that can be subclassed again.Request ID used to invoke the request.Request ID used when dispatching this request.status()
Received HTTP status.status
(Http.ResponseStatus status) Response status returned by the API call.
-
Constructor Details
-
Builder
protected Builder()New builder.
-
-
Method Details
-
headers
Configure the HTTP headers returned by the API call.- Parameters:
headers
- headers- Returns:
- updated builder
-
status
Response status returned by the API call.- Parameters:
status
- HTTP status- Returns:
- updated builder
-
requestId
Request ID used when dispatching this request.- Parameters:
requestId
- request id- Returns:
- updated builder
-
headers
Received HTTP headers.- Returns:
- headers
-
status
Received HTTP status.- Returns:
- status
-
requestId
Request ID used to invoke the request. This may be generated byRestApi
- Returns:
- request id
-
me
Can be returned by subclasses that can be subclassed again.- Returns:
- this instance as a subclass type
-