class ReactorServerHttpRequest extends AbstractServerHttpRequest
ServerHttpRequest
to the Reactor HttpServerRequest
.ServerHttpRequest.Builder
Modifier and Type | Field and Description |
---|---|
private NettyDataBufferFactory |
bufferFactory |
private HttpServerRequest |
request |
Constructor and Description |
---|
ReactorServerHttpRequest(HttpServerRequest request,
NettyDataBufferFactory bufferFactory) |
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.
|
private static java.lang.String |
getScheme(HttpServerRequest request) |
protected MultiValueMap<java.lang.String,HttpCookie> |
initCookies()
Obtain the cookies from the underlying "native" request and adapt those to
an
HttpCookie map. |
private static HttpHeaders |
initHeaders(HttpServerRequest channel) |
protected SslInfo |
initSslInfo()
Obtain SSL session information from the underlying "native" request.
|
private static java.net.URI |
initUri(HttpServerRequest request) |
private static java.net.URI |
resolveBaseUrl(HttpServerRequest request) |
private static java.lang.String |
resolveRequestUri(HttpServerRequest request) |
getCookies, getHeaders, getPath, getQueryParams, getSslInfo, getURI, initQueryParams
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
mutate
getMethod
private final HttpServerRequest request
private final NettyDataBufferFactory bufferFactory
public ReactorServerHttpRequest(HttpServerRequest request, NettyDataBufferFactory bufferFactory) throws java.net.URISyntaxException
java.net.URISyntaxException
private static java.net.URI initUri(HttpServerRequest request) throws java.net.URISyntaxException
java.net.URISyntaxException
private static java.net.URI resolveBaseUrl(HttpServerRequest request) throws java.net.URISyntaxException
java.net.URISyntaxException
private static java.lang.String getScheme(HttpServerRequest request)
private static java.lang.String resolveRequestUri(HttpServerRequest request)
private static HttpHeaders initHeaders(HttpServerRequest channel)
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
public java.net.InetSocketAddress getRemoteAddress()
ServerHttpRequest
@Nullable protected SslInfo initSslInfo()
AbstractServerHttpRequest
initSslInfo
in class AbstractServerHttpRequest
null
if none availablepublic <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