private static class DefaultServerHttpRequestBuilder.DefaultServerHttpRequest extends AbstractServerHttpRequest
ServerHttpRequest.Builder
Modifier and Type | Field and Description |
---|---|
private <any> |
body |
private MultiValueMap<java.lang.String,HttpCookie> |
cookies |
private java.lang.String |
methodValue |
private ServerHttpRequest |
originalRequest |
private java.net.InetSocketAddress |
remoteAddress |
Constructor and Description |
---|
DefaultServerHttpRequest(java.net.URI uri,
java.lang.String contextPath,
HttpHeaders headers,
java.lang.String methodValue,
MultiValueMap<java.lang.String,HttpCookie> cookies,
java.net.InetSocketAddress remoteAddress,
<any> body,
ServerHttpRequest originalRequest) |
Modifier and Type | Method and Description |
---|---|
<any> |
getBody()
Return the body of the message as a
Publisher . |
java.lang.String |
getMethodValue()
Return the HTTP method of the request as a String
|
<T> T |
getNativeRequest()
Return the underlying server response.
|
java.net.InetSocketAddress |
getRemoteAddress()
Return the remote address where this request is connected to, if available.
|
protected MultiValueMap<java.lang.String,HttpCookie> |
initCookies()
Obtain the cookies from the underlying "native" request and adapt those to
an
HttpCookie map. |
getCookies, getHeaders, getPath, getQueryParams, getURI, initQueryParams
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
mutate
getMethod
private final java.lang.String methodValue
private final MultiValueMap<java.lang.String,HttpCookie> cookies
@Nullable private final java.net.InetSocketAddress remoteAddress
private final <any> body
private final ServerHttpRequest originalRequest
public DefaultServerHttpRequest(java.net.URI uri, @Nullable java.lang.String contextPath, HttpHeaders headers, java.lang.String methodValue, MultiValueMap<java.lang.String,HttpCookie> cookies, @Nullable java.net.InetSocketAddress remoteAddress, <any> body, ServerHttpRequest originalRequest)
public java.lang.String getMethodValue()
HttpRequest
protected MultiValueMap<java.lang.String,HttpCookie> initCookies()
AbstractServerHttpRequest
HttpCookie
map. The return value is turned into an immutable
map and cached.
Note that this method is invoked lazily on access to
AbstractServerHttpRequest.getCookies()
. Sub-classes should synchronize cookie
initialization if the underlying "native" request does not provide
thread-safe access to cookie data.
initCookies
in class AbstractServerHttpRequest
@Nullable public java.net.InetSocketAddress getRemoteAddress()
ServerHttpRequest
public <any> getBody()
ReactiveHttpInputMessage
Publisher
.public <T> T getNativeRequest()
AbstractServerHttpRequest
Note: This is exposed mainly for internal framework use such as WebSocket upgrades in the spring-webflux module.
getNativeRequest
in class AbstractServerHttpRequest