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<T>
Abstract fluent API builder to build subclasses ofApiResponse
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder()
New builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Headers
headers()
Received HTTP headers.B
headers(Headers headers)
Configure the HTTP headers returned by the API call.protected B
me()
Can be returned by subclasses that can be subclassed again.String
requestId()
Request ID used to invoke the request.B
requestId(String requestId)
Request ID used when dispatching this request.Http.ResponseStatus
status()
Received HTTP status.B
status(Http.ResponseStatus status)
Response status returned by the API call.
-
-
-
Method Detail
-
headers
public B headers(Headers headers)
Configure the HTTP headers returned by the API call.- Parameters:
headers
- headers- Returns:
- updated builder
-
status
public B status(Http.ResponseStatus status)
Response status returned by the API call.- Parameters:
status
- HTTP status- Returns:
- updated builder
-
requestId
public B requestId(String requestId)
Request ID used when dispatching this request.- Parameters:
requestId
- request id- Returns:
- updated builder
-
headers
public Headers headers()
Received HTTP headers.- Returns:
- headers
-
status
public Http.ResponseStatus status()
Received HTTP status.- Returns:
- status
-
requestId
public String requestId()
Request ID used to invoke the request. This may be generated byRestApi
- Returns:
- request id
-
me
protected B me()
Can be returned by subclasses that can be subclassed again.- Returns:
- this instance as a subclass type
-
-