Class ServerHttpRequestDecorator
java.lang.Object
org.springframework.http.server.reactive.ServerHttpRequestDecorator
- All Implemented Interfaces:
HttpMessage
,HttpRequest
,ReactiveHttpInputMessage
,ServerHttpRequest
Wraps another
ServerHttpRequest
and delegates all methods to it.
Subclasses can override specific methods selectively.- Since:
- 5.0
- Author:
- Rossen Stoyanchev
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.http.server.reactive.ServerHttpRequest
ServerHttpRequest.Builder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Flux<DataBuffer>
getBody()
Return the body of the message as aPublisher
.Return a read-only map of cookies sent by the client.Return the headers of this message.getId()
Return an id that represents the underlying connection, if available, or the request for the purpose of correlating log messages.Return the local address the request was accepted on, if available.Return the HTTP method of the request.static <T> T
getNativeRequest
(ServerHttpRequest request) Return the native request of the underlying server API, if possible, also unwrappingServerHttpRequestDecorator
if necessary.getPath()
Returns a structured representation of the full request path up to but not including thequery
.Return a read-only map with parsed and decoded query parameter values.Return the remote address where this request is connected to, if available.Return the SSL session information if the request has been transmitted over a secure protocol including SSL certificates, if available.getURI()
Return the URI of the request (including a query string if any, but only if it is well-formed for a URI representation).toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.http.server.reactive.ServerHttpRequest
mutate
-
Constructor Details
-
ServerHttpRequestDecorator
-
-
Method Details
-
getDelegate
-
getId
Description copied from interface:ServerHttpRequest
Return an id that represents the underlying connection, if available, or the request for the purpose of correlating log messages.- Specified by:
getId
in interfaceServerHttpRequest
- See Also:
-
getMethod
Description copied from interface:HttpRequest
Return the HTTP method of the request.- Specified by:
getMethod
in interfaceHttpRequest
- Returns:
- the HTTP method as an HttpMethod value
- See Also:
-
getURI
Description copied from interface:HttpRequest
Return the URI of the request (including a query string if any, but only if it is well-formed for a URI representation).- Specified by:
getURI
in interfaceHttpRequest
- Returns:
- the URI of the request (never
null
)
-
getPath
Description copied from interface:ServerHttpRequest
Returns a structured representation of the full request path up to but not including thequery
.The returned path is subdivided into a
RequestPath.contextPath()
portion and the remainingpathWithinApplication
portion. The latter can be passed into methods ofPathPattern
for path matching purposes.- Specified by:
getPath
in interfaceServerHttpRequest
-
getQueryParams
Description copied from interface:ServerHttpRequest
Return a read-only map with parsed and decoded query parameter values.- Specified by:
getQueryParams
in interfaceServerHttpRequest
-
getHeaders
Description copied from interface:HttpMessage
Return the headers of this message.- Specified by:
getHeaders
in interfaceHttpMessage
- Returns:
- a corresponding HttpHeaders object (never
null
)
-
getCookies
Description copied from interface:ServerHttpRequest
Return a read-only map of cookies sent by the client.- Specified by:
getCookies
in interfaceServerHttpRequest
-
getLocalAddress
Description copied from interface:ServerHttpRequest
Return the local address the request was accepted on, if available.- Specified by:
getLocalAddress
in interfaceServerHttpRequest
-
getRemoteAddress
Description copied from interface:ServerHttpRequest
Return the remote address where this request is connected to, if available.- Specified by:
getRemoteAddress
in interfaceServerHttpRequest
-
getSslInfo
Description copied from interface:ServerHttpRequest
Return the SSL session information if the request has been transmitted over a secure protocol including SSL certificates, if available.- Specified by:
getSslInfo
in interfaceServerHttpRequest
- Returns:
- the session information, or
null
if none available
-
getBody
Description copied from interface:ReactiveHttpInputMessage
Return the body of the message as aPublisher
.- Specified by:
getBody
in interfaceReactiveHttpInputMessage
- Returns:
- the body content publisher
-
getNativeRequest
Return the native request of the underlying server API, if possible, also unwrappingServerHttpRequestDecorator
if necessary.- Type Parameters:
T
- the expected native request type- Parameters:
request
- the request to check- Throws:
IllegalArgumentException
- if the native request can't be obtained- Since:
- 5.3.3
-
toString
-