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.
Sub-classes 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
Constructors -
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.Deprecated.static <T> TgetNativeRequest(ServerHttpRequest request) Return the native request of the underlying server API, if possible, also unwrappingServerHttpRequestDecoratorif 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, waitMethods inherited from interface org.springframework.http.server.reactive.ServerHttpRequest
mutate
-
Constructor Details
-
ServerHttpRequestDecorator
-
-
Method Details
-
getDelegate
-
getId
Description copied from interface:ServerHttpRequestReturn an id that represents the underlying connection, if available, or the request for the purpose of correlating log messages.- Specified by:
getIdin interfaceServerHttpRequest- See Also:
-
getMethod
Description copied from interface:HttpRequestReturn the HTTP method of the request.- Specified by:
getMethodin interfaceHttpRequest- Returns:
- the HTTP method as an HttpMethod value
- See Also:
-
getMethodValue
Deprecated.Description copied from interface:HttpRequestReturn the HTTP method of the request as a String value.- Specified by:
getMethodValuein interfaceHttpRequest- Returns:
- the HTTP method as a plain String
- See Also:
-
getURI
Description copied from interface:HttpRequestReturn the URI of the request (including a query string if any, but only if it is well-formed for a URI representation).- Specified by:
getURIin interfaceHttpRequest- Returns:
- the URI of the request (never
null)
-
getPath
Description copied from interface:ServerHttpRequestReturns a structured representation of the full request path up to but not including thequery.The returned path is sub-divided into a
RequestPath.contextPath()portion and the remainingpathWithinApplicationportion. The latter can be passed into methods ofPathPatternfor path matching purposes.- Specified by:
getPathin interfaceServerHttpRequest
-
getQueryParams
Description copied from interface:ServerHttpRequestReturn a read-only map with parsed and decoded query parameter values.- Specified by:
getQueryParamsin interfaceServerHttpRequest
-
getHeaders
Description copied from interface:HttpMessageReturn the headers of this message.- Specified by:
getHeadersin interfaceHttpMessage- Returns:
- a corresponding HttpHeaders object (never
null)
-
getCookies
Description copied from interface:ServerHttpRequestReturn a read-only map of cookies sent by the client.- Specified by:
getCookiesin interfaceServerHttpRequest
-
getLocalAddress
Description copied from interface:ServerHttpRequestReturn the local address the request was accepted on, if available.- Specified by:
getLocalAddressin interfaceServerHttpRequest
-
getRemoteAddress
Description copied from interface:ServerHttpRequestReturn the remote address where this request is connected to, if available.- Specified by:
getRemoteAddressin interfaceServerHttpRequest
-
getSslInfo
Description copied from interface:ServerHttpRequestReturn the SSL session information if the request has been transmitted over a secure protocol including SSL certificates, if available.- Specified by:
getSslInfoin interfaceServerHttpRequest- Returns:
- the session information, or
nullif none available
-
getBody
Description copied from interface:ReactiveHttpInputMessageReturn the body of the message as aPublisher.- Specified by:
getBodyin interfaceReactiveHttpInputMessage- Returns:
- the body content publisher
-
getNativeRequest
Return the native request of the underlying server API, if possible, also unwrappingServerHttpRequestDecoratorif 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
-