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 builder
X - type of the entity supported by this builder (such as JsonObject, byte[])
All Superinterfaces:
Builder<B,T>, Supplier<T>
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<B,T>
Response builder extracted as an interface, to work around the restriction that we cannot have multiple inheritance in Java.
  • Method Summary

    Modifier and Type
    Method
    Description
    entity(X entity)
    This method is invoked by RestApi when an entity is received.
    headers(Headers headers)
    Configure the HTTP headers returned by the API call.
    requestId(String requestId)
    Request ID used when dispatching this request.
    status(Status status)
    Response status returned by the API call.

    Methods inherited from interface io.helidon.common.Builder

    build, get, identity, update
  • Method Details

    • status

      B status(Status 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
    • entity

      B entity(X entity)
      This method is invoked by RestApi when an entity is received.
      Parameters:
      entity - entity
      Returns:
      updated builder