class DefaultServerHttpRequestBuilder extends java.lang.Object implements ServerHttpRequest.Builder
ServerHttpRequest.Builder
.Modifier and Type | Class and Description |
---|---|
private static class |
DefaultServerHttpRequestBuilder.MutativeDecorator
An immutable wrapper of a request returning property overrides -- given
to the constructor -- or original values otherwise.
|
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
contextPath |
private ServerHttpRequest |
delegate |
private HttpHeaders |
httpHeaders |
private HttpMethod |
httpMethod |
private java.lang.String |
path |
Constructor and Description |
---|
DefaultServerHttpRequestBuilder(ServerHttpRequest delegate) |
Modifier and Type | Method and Description |
---|---|
ServerHttpRequest |
build()
Build a
ServerHttpRequest decorator with the mutated properties. |
ServerHttpRequest.Builder |
contextPath(java.lang.String contextPath)
Set the contextPath to return.
|
ServerHttpRequest.Builder |
header(java.lang.String key,
java.lang.String value)
Set or override the specified header.
|
ServerHttpRequest.Builder |
method(HttpMethod httpMethod)
Set the HTTP method to return.
|
ServerHttpRequest.Builder |
path(java.lang.String path)
Set the request URI to return.
|
private final ServerHttpRequest delegate
private HttpMethod httpMethod
private java.lang.String path
private java.lang.String contextPath
private HttpHeaders httpHeaders
public DefaultServerHttpRequestBuilder(ServerHttpRequest delegate)
public ServerHttpRequest.Builder method(HttpMethod httpMethod)
ServerHttpRequest.Builder
method
in interface ServerHttpRequest.Builder
public ServerHttpRequest.Builder path(java.lang.String path)
ServerHttpRequest.Builder
path
in interface ServerHttpRequest.Builder
public ServerHttpRequest.Builder contextPath(java.lang.String contextPath)
ServerHttpRequest.Builder
contextPath
in interface ServerHttpRequest.Builder
public ServerHttpRequest.Builder header(java.lang.String key, java.lang.String value)
ServerHttpRequest.Builder
header
in interface ServerHttpRequest.Builder
public ServerHttpRequest build()
ServerHttpRequest.Builder
ServerHttpRequest
decorator with the mutated properties.build
in interface ServerHttpRequest.Builder