Package com.acumenvelocity.ath.common
Class Response.Builder
- java.lang.Object
-
- com.acumenvelocity.ath.common.Response.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.swagger.oas.inflector.models.ResponseContextbuild()Builds the ResponseContext with the configured status, headers, and entity.Response.Builderentity(Object entity)Sets the entity for the response (serialized to JSON for non-String/File types).Response.Builderheader(String name, String value)Adds a header to the response.Response.Builderstatus(javax.ws.rs.core.Response.Status status)Sets the HTTP status for the response.
-
-
-
Method Detail
-
status
public Response.Builder status(javax.ws.rs.core.Response.Status status)
Sets the HTTP status for the response.- Parameters:
status- the HTTP status- Returns:
- this Builder for chaining
-
header
public Response.Builder header(String name, String value)
Adds a header to the response.- Parameters:
name- the header namevalue- the header value- Returns:
- this Builder for chaining
-
entity
public Response.Builder entity(Object entity)
Sets the entity for the response (serialized to JSON for non-String/File types).- Parameters:
entity- the entity object- Returns:
- this Builder for chaining
-
build
public io.swagger.oas.inflector.models.ResponseContext build()
Builds the ResponseContext with the configured status, headers, and entity.- Returns:
- the constructed ResponseContext
-
-