类 AbstractServerHttpRequest
java.lang.Object
cn.taketoday.http.server.reactive.AbstractServerHttpRequest
- 所有已实现的接口:
HttpMessage,HttpRequest,ReactiveHttpInputMessage,ServerHttpRequest
- 直接已知子类:
DefaultServerHttpRequestBuilder.MutatedServerHttpRequest,ReactorNetty2ServerHttpRequest,ReactorServerHttpRequest,ServletServerHttpRequest,UndertowServerHttpRequest
Common base class for
ServerHttpRequest implementations.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
-
嵌套类概要
从接口继承的嵌套类/接口 cn.taketoday.http.server.reactive.ServerHttpRequest
ServerHttpRequest.Builder -
字段概要
字段修饰符和类型字段说明private cn.taketoday.util.MultiValueMap<String,HttpCookie> private final HttpHeadersprivate Stringprivate Stringprivate HttpMethodprivate final RequestPathprivate static final Patternprivate SslInfoprivate final URI -
构造器概要
构造器构造器说明AbstractServerHttpRequest(HttpMethod method, URI uri, String contextPath, cn.taketoday.util.MultiValueMap<String, String> headers) Constructor with the method, URI and headers for the request.AbstractServerHttpRequest(URI uri, String contextPath, HttpHeaders headers) Constructor with the URI and headers for the request.AbstractServerHttpRequest(URI uri, String contextPath, cn.taketoday.util.MultiValueMap<String, String> headers) Constructor with the URI and headers for the request. -
方法概要
修饰符和类型方法说明private StringdecodeQueryParam(String value) cn.taketoday.util.MultiValueMap<String,HttpCookie> 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.(专用程序包) StringFor internal use in logging at the HTTP adapter layer.Return the HTTP method of the request.abstract <T> TReturn the underlying server response.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 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).protected abstract cn.taketoday.util.MultiValueMap<String,HttpCookie> Obtain the cookies from the underlying "native" request and adapt those to anHttpCookiemap.protected StringinitId()Obtain the request id to use, ornullin which case the Object identity of this request instance is used.protected StringSubclasses can override this to provide the prefix to use for log messages.A method for parsing of the query into name-value pairs.protected abstract SslInfoObtain SSL session information from the underlying "native" request.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.taketoday.http.HttpRequest
getMethodValue从接口继承的方法 cn.taketoday.http.ReactiveHttpInputMessage
getBody从接口继承的方法 cn.taketoday.http.server.reactive.ServerHttpRequest
getLocalAddress, getRemoteAddress, mutate
-
字段详细资料
-
QUERY_PATTERN
-
uri
-
path
-
headers
-
queryParams
-
cookies
-
sslInfo
-
id
-
logPrefix
-
method
-
-
构造器详细资料
-
AbstractServerHttpRequest
public AbstractServerHttpRequest(URI uri, @Nullable String contextPath, cn.taketoday.util.MultiValueMap<String, String> headers) Constructor with the URI and headers for the request.- 参数:
uri- the URI for the requestcontextPath- the context path for the requestheaders- the headers for the request (asMultiValueMap)
-
AbstractServerHttpRequest
Constructor with the URI and headers for the request.- 参数:
uri- the URI for the requestcontextPath- the context path for the requestheaders- the headers for the request (asHttpHeaders)
-
AbstractServerHttpRequest
public AbstractServerHttpRequest(HttpMethod method, URI uri, @Nullable String contextPath, cn.taketoday.util.MultiValueMap<String, String> headers) Constructor with the method, URI and headers for the request.- 参数:
method- the HTTP method for the requesturi- the URI for the requestcontextPath- the context path for the requestheaders- the headers for the request (asMultiValueMap)
-
-
方法详细资料
-
getId
从接口复制的说明:ServerHttpRequestReturn an id that represents the underlying connection, if available, or the request for the purpose of correlating log messages.- 指定者:
getId在接口中ServerHttpRequest
-
initId
Obtain the request id to use, ornullin which case the Object identity of this request instance is used. -
getMethod
从接口复制的说明:HttpRequestReturn the HTTP method of the request.- 指定者:
getMethod在接口中HttpRequest- 返回:
- the HTTP method as an HttpMethod value
- 另请参阅:
-
getURI
从接口复制的说明:HttpRequestReturn the URI of the request (including a query string if any, but only if it is well-formed for a URI representation).- 指定者:
getURI在接口中HttpRequest- 返回:
- the URI of the request (never
null)
-
getPath
从接口复制的说明: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.- 指定者:
getPath在接口中ServerHttpRequest
-
getHeaders
从接口复制的说明:HttpMessageReturn the headers of this message.- 指定者:
getHeaders在接口中HttpMessage- 返回:
- a corresponding HttpHeaders object (never
null)
-
getQueryParams
从接口复制的说明:ServerHttpRequestReturn a read-only map with parsed and decoded query parameter values.- 指定者:
getQueryParams在接口中ServerHttpRequest
-
initQueryParams
A method for parsing of the query into name-value pairs. The return value is turned into an immutable map and cached.Note that this method is invoked lazily on first access to
getQueryParams(). The invocation is not synchronized but the parsing is thread-safe nevertheless. -
decodeQueryParam
-
getCookies
从接口复制的说明:ServerHttpRequestReturn a read-only map of cookies sent by the client.- 指定者:
getCookies在接口中ServerHttpRequest
-
initCookies
Obtain the cookies from the underlying "native" request and adapt those to anHttpCookiemap. The return value is turned into an immutable map and cached.Note that this method is invoked lazily on access to
getCookies(). Sub-classes should synchronize cookie initialization if the underlying "native" request does not provide thread-safe access to cookie data. -
getSslInfo
从接口复制的说明:ServerHttpRequestReturn the SSL session information if the request has been transmitted over a secure protocol including SSL certificates, if available.- 指定者:
getSslInfo在接口中ServerHttpRequest- 返回:
- the session information, or
nullif none available
-
initSslInfo
Obtain SSL session information from the underlying "native" request.- 返回:
- the session information, or
nullif none available
-
getNativeRequest
public abstract <T> T getNativeRequest()Return the underlying server response. -
getLogPrefix
String getLogPrefix()For internal use in logging at the HTTP adapter layer. -
initLogPrefix
Subclasses can override this to provide the prefix to use for log messages.By default, this is
getId().
-