Class ApiEntityResponse.Builder<B extends ApiEntityResponse.Builder<B,T,X>,T extends ApiEntityResponse,X>
- java.lang.Object
-
- io.helidon.integrations.common.rest.ApiResponse.Builder<B,T>
-
- io.helidon.integrations.common.rest.ApiEntityResponse.Builder<B,T,X>
-
- Type Parameters:
B- type of the builder (subclass of this class)T- type of the response being builtX- type of the entity supported (JsonObject,Multi, orbyte[])
- All Implemented Interfaces:
Builder<T>,ResponseBuilder<B,T,X>,Supplier<T>
- Enclosing class:
- ApiEntityResponse
public abstract static class ApiEntityResponse.Builder<B extends ApiEntityResponse.Builder<B,T,X>,T extends ApiEntityResponse,X> extends ApiResponse.Builder<B,T> implements ResponseBuilder<B,T,X>
Fluent API builder base to build subclasses ofApiEntityResponse.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder()Create a new builder instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Xentity()Accessor to entity that can be used in subclasses ofApiEntityResponseto set up fields.Bentity(X entity)This method is invoked byRestApiwhen an entity is received.-
Methods inherited from class io.helidon.integrations.common.rest.ApiResponse.Builder
headers, headers, me, requestId, requestId, status, status
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.helidon.integrations.common.rest.ResponseBuilder
headers, requestId, status
-
-
-
-
Method Detail
-
entity
public B entity(X entity)
This method is invoked byRestApiwhen an entity is received.- Specified by:
entityin interfaceResponseBuilder<B extends ApiEntityResponse.Builder<B,T,X>,T extends ApiEntityResponse,X>- Parameters:
entity- entity- Returns:
- updated builder
-
entity
public X entity()
Accessor to entity that can be used in subclasses ofApiEntityResponseto set up fields.- Returns:
- received entity
-
-