类 DefaultServerRequestBuilder.BuiltServerRequest
java.lang.Object
cn.taketoday.web.handler.function.DefaultServerRequestBuilder.BuiltServerRequest
- 所有已实现的接口:
ServerRequest,ServerResponse.Context
private static class DefaultServerRequestBuilder.BuiltServerRequest
extends Object
implements ServerRequest
-
嵌套类概要
嵌套类从接口继承的嵌套类/接口 cn.taketoday.web.handler.function.ServerRequest
ServerRequest.Builder, ServerRequest.Headers -
字段概要
字段修饰符和类型字段说明private final byte[]private final cn.taketoday.util.MultiValueMap<String,HttpCookie> private final HttpHeadersprivate final List<HttpMessageConverter<?>>private final HttpMethodprivate final InetSocketAddressprivate final RequestContextprivate final URI -
构造器概要
构造器构造器说明BuiltServerRequest(RequestContext requestContext, HttpMethod method, URI uri, HttpHeaders headers, cn.taketoday.util.MultiValueMap<String, HttpCookie> cookies, Map<String, Object> attributes, cn.taketoday.util.MultiValueMap<String, String> params, InetSocketAddress remoteAddress, byte[] body, List<HttpMessageConverter<?>> messageConverters) -
方法概要
修饰符和类型方法说明Get a mutable map of request attributes.<T> Tbind(Class<T> bindType, Consumer<WebDataBinder> dataBinderCustomizer) Bind to this request and return an instance of the given type.<T> Tbody(cn.taketoday.core.ParameterizedTypeReference<T> bodyType) Extract the body as an object of the given type.<T> TExtract the body as an object of the given type.private <T> TbodyInternal(Type bodyType, Class<?> bodyClass) cn.taketoday.util.MultiValueMap<String,HttpCookie> cookies()Get the cookies of this request.exchange()Get the request that this request is based on.headers()Get the headers of this request.Get the readers used to convert the body of this request.method()Get the HTTP method.Get the name of the HTTP method.Get the parts of a multipart request, provided the Content-Type is"multipart/form-data", or an exception otherwise.params()Get all parameters for this request. parameters are contained in the query string or posted form data.Get all path variables for this request.Get the remote address to which this request is connected, if available.uri()Get the request URI.Get aUriBuilderComponentsfrom the URI associated with thisServerRequest.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.taketoday.web.handler.function.ServerRequest
attribute, bind, checkNotModified, checkNotModified, checkNotModified, param, params, path, pathVariable, requestPath
-
字段详细资料
-
method
-
uri
-
headers
-
requestContext
-
cookies
-
attributes
-
body
private final byte[] body -
messageConverters
-
params
-
remoteAddress
-
-
构造器详细资料
-
BuiltServerRequest
public BuiltServerRequest(RequestContext requestContext, HttpMethod method, URI uri, HttpHeaders headers, cn.taketoday.util.MultiValueMap<String, HttpCookie> cookies, Map<String, Object> attributes, cn.taketoday.util.MultiValueMap<String, String> params, @Nullable InetSocketAddress remoteAddress, byte[] body, List<HttpMessageConverter<?>> messageConverters)
-
-
方法详细资料
-
method
从接口复制的说明:ServerRequestGet the HTTP method.- 指定者:
method在接口中ServerRequest- 返回:
- the HTTP method as an HttpMethod enum value, or
nullif not resolvable (e.g. in case of a non-standard HTTP method)
-
methodName
从接口复制的说明:ServerRequestGet the name of the HTTP method.- 指定者:
methodName在接口中ServerRequest- 返回:
- the HTTP method as a String
-
multipartData
从接口复制的说明:ServerRequestGet the parts of a multipart request, provided the Content-Type is"multipart/form-data", or an exception otherwise.- 指定者:
multipartData在接口中ServerRequest- 返回:
- the multipart data, mapping from name to part(s)
- 抛出:
IOException- if an I/O error occurred during the retrieval- 另请参阅:
-
uri
从接口复制的说明:ServerRequestGet the request URI.- 指定者:
uri在接口中ServerRequest
-
uriBuilder
从接口复制的说明:ServerRequestGet aUriBuilderComponentsfrom the URI associated with thisServerRequest.- 指定者:
uriBuilder在接口中ServerRequest- 返回:
- a URI builder
-
headers
从接口复制的说明:ServerRequestGet the headers of this request.- 指定者:
headers在接口中ServerRequest
-
cookies
从接口复制的说明:ServerRequestGet the cookies of this request.- 指定者:
cookies在接口中ServerRequest
-
remoteAddress
从接口复制的说明:ServerRequestGet the remote address to which this request is connected, if available.- 指定者:
remoteAddress在接口中ServerRequest
-
messageConverters
从接口复制的说明:ServerRequestGet the readers used to convert the body of this request.- 指定者:
messageConverters在接口中ServerRequest- 指定者:
messageConverters在接口中ServerResponse.Context- 返回:
- the list of message writers
-
body
从接口复制的说明:ServerRequestExtract the body as an object of the given type.- 指定者:
body在接口中ServerRequest- 类型参数:
T- the body type- 参数:
bodyType- the type of return value- 返回:
- the body
- 抛出:
IOException
-
body
从接口复制的说明:ServerRequestExtract the body as an object of the given type.- 指定者:
body在接口中ServerRequest- 类型参数:
T- the body type- 参数:
bodyType- the type of return value- 返回:
- the body
- 抛出:
IOException
-
bodyInternal
- 抛出:
IOException
-
bind
public <T> T bind(Class<T> bindType, Consumer<WebDataBinder> dataBinderCustomizer) throws cn.taketoday.validation.BindException 从接口复制的说明:ServerRequestBind to this request and return an instance of the given type.- 指定者:
bind在接口中ServerRequest- 类型参数:
T- the type to bind to- 参数:
bindType- the type of class to bind this request todataBinderCustomizer- used to customize the data binder, e.g. set (dis)allowed fields- 返回:
- a constructed and bound instance of
bindType - 抛出:
cn.taketoday.validation.BindException- in case of binding errors
-
attributes
从接口复制的说明:ServerRequestGet a mutable map of request attributes.- 指定者:
attributes在接口中ServerRequest- 返回:
- the request attributes
-
params
从接口复制的说明:ServerRequestGet all parameters for this request. parameters are contained in the query string or posted form data.- 指定者:
params在接口中ServerRequest- 另请参阅:
-
pathVariables
从接口复制的说明:ServerRequestGet all path variables for this request.- 指定者:
pathVariables在接口中ServerRequest
-
exchange
从接口复制的说明:ServerRequestGet the request that this request is based on.- 指定者:
exchange在接口中ServerRequest
-