Top Description Fields Constructors Methods
org.springframework.http.server.reactive

public Class ServerHttpRequestDecorator

extends Object
implements ServerHttpRequest
Class Inheritance
All Implemented Interfaces
org.springframework.http.server.reactive.ServerHttpRequest, org.springframework.http.ReactiveHttpInputMessage, org.springframework.http.HttpMessage, org.springframework.http.HttpRequest
Imports
java.net.InetSocketAddress, .URI, reactor.core.publisher.Flux, org.springframework.core.io.buffer.DataBuffer, org.springframework.http.HttpCookie, .HttpHeaders, .HttpMethod, org.springframework.http.server.RequestPath, org.springframework.lang.Nullable, org.springframework.util.Assert, .MultiValueMap

Wraps another ServerHttpRequest and delegates all methods to it. Subclasses can override specific methods selectively.
Author
Rossen Stoyanchev
Since
5.0

Field Summary

Modifier and TypeField and Description
private final ServerHttpRequest

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Flux<DataBuffer>
getBody()

Implements org.springframework.http.ReactiveHttpInputMessage.getBody.

Return the body of the message as a Publisher.

public MultiValueMap<String, HttpCookie>
getCookies()

Implements org.springframework.http.server.reactive.ServerHttpRequest.getCookies.

Return a read-only map of cookies sent by the client.

public ServerHttpRequest
public HttpHeaders
getHeaders()

Implements org.springframework.http.HttpMessage.getHeaders.

Return the headers of this message.

public String
getId()

Implements org.springframework.http.server.reactive.ServerHttpRequest.getId.

Return an id that represents the underlying connection, if available, or the request for the purpose of correlating log messages.

public InetSocketAddress
getLocalAddress()

Overrides default org.springframework.http.server.reactive.ServerHttpRequest.getLocalAddress.

Return the local address the request was accepted on, if available.

public HttpMethod
getMethod()

Implements org.springframework.http.HttpRequest.getMethod.

Return the HTTP method of the request.

public static <
the expected native request type
T
>
T
getNativeRequest(ServerHttpRequest
the request to check
request
)

Return the native request of the underlying server API, if possible, also unwrapping ServerHttpRequestDecorator if necessary.

public RequestPath
getPath()

Implements org.springframework.http.server.reactive.ServerHttpRequest.getPath.

Returns a structured representation of the full request path up to but not including the query.

public MultiValueMap<String, String>
getQueryParams()

Implements org.springframework.http.server.reactive.ServerHttpRequest.getQueryParams.

Return a read-only map with parsed and decoded query parameter values.

public InetSocketAddress
getRemoteAddress()

Overrides default org.springframework.http.server.reactive.ServerHttpRequest.getRemoteAddress.

Return the remote address where this request is connected to, if available.

public SslInfo
getSslInfo()

Overrides default org.springframework.http.server.reactive.ServerHttpRequest.getSslInfo.

Return the SSL session information if the request has been transmitted over a secure protocol including SSL certificates, if available.

public URI
getURI()

Implements org.springframework.http.HttpRequest.getURI.

Return the URI of the request (including a query string if any, but only if it is well-formed for a URI representation).

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

delegateback to summary
private final ServerHttpRequest delegate

Constructor Detail

ServerHttpRequestDecoratorback to summary
public ServerHttpRequestDecorator(ServerHttpRequest delegate)

Method Detail

getBodyback to summary
public Flux<DataBuffer> getBody()

Implements org.springframework.http.ReactiveHttpInputMessage.getBody.

Doc from org.springframework.http.ReactiveHttpInputMessage.getBody.

Return the body of the message as a Publisher.

Returns:Flux<DataBuffer>

the body content publisher

Annotations
@Override
getCookiesback to summary
public MultiValueMap<String, HttpCookie> getCookies()

Implements org.springframework.http.server.reactive.ServerHttpRequest.getCookies.

Doc from org.springframework.http.server.reactive.ServerHttpRequest.getCookies.

Return a read-only map of cookies sent by the client.

Annotations
@Override
getDelegateback to summary
public ServerHttpRequest getDelegate()
getHeadersback to summary
public HttpHeaders getHeaders()

Implements org.springframework.http.HttpMessage.getHeaders.

Doc from org.springframework.http.HttpMessage.getHeaders.

Return the headers of this message.

Returns:HttpHeaders

a corresponding HttpHeaders object (never null)

Annotations
@Override
getIdback to summary
public String getId()

Implements org.springframework.http.server.reactive.ServerHttpRequest.getId.

Doc from org.springframework.http.server.reactive.ServerHttpRequest.getId.

Return an id that represents the underlying connection, if available, or the request for the purpose of correlating log messages.

Annotations
@Override
getLocalAddressback to summary
public InetSocketAddress getLocalAddress()

Overrides default org.springframework.http.server.reactive.ServerHttpRequest.getLocalAddress.

Doc from org.springframework.http.server.reactive.ServerHttpRequest.getLocalAddress.

Return the local address the request was accepted on, if available.

Annotations
@Override
@Nullable
getMethodback to summary
public HttpMethod getMethod()

Implements org.springframework.http.HttpRequest.getMethod.

Doc from org.springframework.http.HttpRequest.getMethod.

Return the HTTP method of the request.

Returns:HttpMethod

the HTTP method as an HttpMethod value

Annotations
@Override
getNativeRequestback to summary
public static <T> T getNativeRequest(ServerHttpRequest request)

Return the native request of the underlying server API, if possible, also unwrapping ServerHttpRequestDecorator if necessary.

Parameters
<T>
the expected native request type
request:ServerHttpRequest

the request to check

Exceptions
IllegalArgumentException:
if the native request can't be obtained
Since
5.3.3
getPathback to summary
public RequestPath getPath()

Implements org.springframework.http.server.reactive.ServerHttpRequest.getPath.

Doc from org.springframework.http.server.reactive.ServerHttpRequest.getPath.

Returns a structured representation of the full request path up to but not including the query.

The returned path is subdivided into a RequestPath#contextPath() portion and the remaining pathWithinApplication portion. The latter can be passed into methods of org.springframework.web.util.pattern.PathPattern for path matching purposes.

Annotations
@Override
getQueryParamsback to summary
public MultiValueMap<String, String> getQueryParams()

Implements org.springframework.http.server.reactive.ServerHttpRequest.getQueryParams.

Doc from org.springframework.http.server.reactive.ServerHttpRequest.getQueryParams.

Return a read-only map with parsed and decoded query parameter values.

Annotations
@Override
getRemoteAddressback to summary
public InetSocketAddress getRemoteAddress()

Overrides default org.springframework.http.server.reactive.ServerHttpRequest.getRemoteAddress.

Doc from org.springframework.http.server.reactive.ServerHttpRequest.getRemoteAddress.

Return the remote address where this request is connected to, if available.

Annotations
@Override
@Nullable
getSslInfoback to summary
public SslInfo getSslInfo()

Overrides default org.springframework.http.server.reactive.ServerHttpRequest.getSslInfo.

Doc from org.springframework.http.server.reactive.ServerHttpRequest.getSslInfo.

Return the SSL session information if the request has been transmitted over a secure protocol including SSL certificates, if available.

Returns:SslInfo

the session information, or null if none available

Annotations
@Override
@Nullable
getURIback to summary
public URI getURI()

Implements org.springframework.http.HttpRequest.getURI.

Doc from org.springframework.http.HttpRequest.getURI.

Return the URI of the request (including a query string if any, but only if it is well-formed for a URI representation).

Returns:URI

the URI of the request (never null)

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override