java.lang.Object
io.helidon.http.DirectHandler.TransportResponse.Builder
- All Implemented Interfaces:
- Builder<DirectHandler.TransportResponse.Builder,,- DirectHandler.TransportResponse> - Supplier<DirectHandler.TransportResponse>
- Enclosing class:
- DirectHandler.TransportResponse
public static class DirectHandler.TransportResponse.Builder
extends Object
implements Builder<DirectHandler.TransportResponse.Builder,DirectHandler.TransportResponse> 
Fluent API builder for 
DirectHandler.TransportResponse.- 
Method SummaryModifier and TypeMethodDescriptionbuild()Build the instance from this builder.entity(byte[] entity) Custom entity.Custom entity.Set a header (if exists, it would be replaced).header(HeaderName name, String... values) Set a header (if exists, it would be replaced).headers(ServerResponseHeaders headers) Set headers.keepAlive(boolean keepAlive) Configure keep alive.Custom status.
- 
Method Details- 
buildDescription copied from interface:BuilderBuild the instance from this builder.- Specified by:
- buildin interface- Builder<DirectHandler.TransportResponse.Builder,- DirectHandler.TransportResponse> 
- Returns:
- instance of the built type
 
- 
statusCustom status.- Parameters:
- status- status to use, default is bad request
- Returns:
- updated builder
 
- 
headersSet headers.- Parameters:
- headers- headers to use
- Returns:
- updated builder
 
- 
headerSet a header (if exists, it would be replaced). Keep alive header is ignored, please usekeepAlive(boolean).- Parameters:
- name- name of the header
- values- value of the header
- Returns:
- updated builder
 
- 
headerSet a header (if exists, it would be replaced). Keep alive header is ignored, please usekeepAlive(boolean).- Parameters:
- header- header value
- Returns:
- updated builder
 
- 
keepAliveConfigure keep alive.- Parameters:
- keepAlive- whether to keep alive
- Returns:
- updated builder
 
- 
entityCustom entity. Uses the content, reads it asUTF-8, configuresContent-Lengthheader, configuresContent-Typeheader totext/plain.Use entity(byte[])for custom encoding.Note that this method does not do any escaping (such as HTML encoding), make sure the entity is safe. - Parameters:
- entity- response entity
- Returns:
- updated builder
 
- 
entityCustom entity. Uses the content, configuresContent-Lengthheader.Use entity(String)for simple text messages.- Parameters:
- entity- response entity
- Returns:
- updated builder
 
 
-