Dispatcher类总共有将近2000行代码。。
Dispatcher继承自AbstractController,从之前的博客(https://www.cnblogs.com/2008nmj/p/14768732.html)可以知道,该类是负责处理请求的,转发给各个相关的类分别处理。
看该类的简介:
/**
* Dispatches an http request to an open web service (OWS).将一个http请求派发给OWS。
*
* <p>An OWS request contains three bits of information:一个OWS请求包含三点信息:
*
* <ol>
* <li>The service being called 调用的服务
* <li>The operation of the service to execute 服务要执行的的操作
* <li>The version of the service ( optional ) 服务的版本(可选)
* </ol>
*
* <p>Additional, an OWS request can contain an arbitray number of additional parameters.除此之外,一个OWS请求还可以包含任意数量的额外的参数。
*
* <p>An OWS request can be specified in two forms. The first form is known as "KVP" in which all一个OWS请求可以以两种形式来指定。第一种形式是“KVP”,其中所有的参数都是以键值对的形式组成的。通常,这种形式的请求是以http "GET"请求的方式生成的,参数
* the parameters come in the form of a set of key-value pairs. Commonly this type of request is 在请求字符串中指定:
* made in an http "GET" request, the parameters being specified in the query string:
*
* <pre>
* <code>http://www.xyz.com/geoserver?service=someService&request=someRequest&version=X.Y.Z&param1=...&param2=...</code>
* </pre>
*
* <p>This type of request can also be made in a "POST" request in with a mime-type of这种类型的请求也可以在mime类型为“application/x-www-form-urlencoded”的“POST”请求中进行。
* "application/x-www-form-urlencoded".
*
* <p>The second form is known as "XML" in which all the parameters come in the form of an xml 第二种形式称为“XML”,其中所有参数都以XML的形式出现文件。这种类型的请求是在http“POST”请求中发出的。
* document. This type of request is made in an http "POST" request.
*
* <pre><code>
* <?xml version="1.0" encoding="UTF-8"?>
* <SomeRequest service="someService" version="X.Y.Z">
* <Param1>...</Param1>
* <Param2>...</Param2>
* ...
* </SomeRequest>
* </code></pre>
*
* <p>When a request is received, the <b>service</b> the <b>version</b> parameters are used to当接收到请求时,
* locate a service desciptor, an instance of {@link Service} . With the service descriptor, the
* <b>request</b> parameter is used to locate the operation of the service to call.
*
* @author Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org
*/
向开放的Web服务(OWS)发送http请求。
OWS请求包含三位信息:
1.被调用的服务
2.要执行的服务的操作
3.服务版本(可选)
另外,OWS请求可以包含附加参数的仲裁数。
OWS请求可以通过两种形式指定。第一种形式称为“kvp”,其中所有参数都以一组键值对的形式出现。通常这种类型的请求是 在http“get”请求中发出,在查询字符串中指定的参数:
http: //ww. xyz. com/ geoserver?service=someServi ce&request-someRequest&version=X. Y. Z&par am1-... bparam2=...
这种类型的请求也可以在“POST”请求中使用MIME类型的“application/x-www-form-urlencode”进行。
第二种形式称为“XML”,其中所有参数都以XML文档的形式出现。这类请求是在http“POST”请求中提出的。 50meinequest .ennce, 50不平等。 omeService” version= "X. Y. I"> MomeService“Version=”X.Y.i“> <Param2>... </Par am2> <Param 2>.</param 2> </ SomeRequest> </SomeRequest> When a request is received, the service the version parameters are used to locate a service desciptor, an instance of {@link Service} . With the service descriptor, the request parameter is 当接收到请求时,将使用版本参数的服务来定位服务指示符({@link Service}的实例)。对于服务描述符,请求参数为 used to locate the operation of the service to call. @author Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org 用于定位要调用的服务的操作。@作者Justin Deoliveira,“开放规划项目”,jdelive@openplans.org
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
2018-05-17 PyTorch
2018-05-17 ArcGIS SimplifyLine