$webwork.htmlEncode($page.space.name) : Servlets
This page last changed on Oct 20, 2006 by cholmes.
Introduction In this section we will explain in details how the GeoServer Servlets work. Each GeoServer service is provided by a specific Servlet that intercepts the client requests and builds up the response in accordance to the GeoServer configuration. Design
The main WCS Servlet class is represented by the object org.vfny.geoserver.wcs.servlets.WcsDispatcher. As you can see from the diagram it inherits from the base class org.vfny.geoserver.servlets.Dispatcher which extends the class javax.servlet.http.HttpServlet. Notice that the packages structure tends to separate the various GeoServer Services classes therefore you will find all the WCS Service classes under the package org.vfny.geoserver.wcs and all the WCS Servlet classes under the package org.vfny.geoserver.wcs.servlets. In the main web-app configuration file web.xml you can find the WCS Servlet definition: <servlet> The Dispatcher class is the base of each GeoServer Service dispatcher. A dispatcher handles the client requests and redirects the latter to another specific Servlet by instantiating an object called dispatched. Notice that the client can also directly call the right Servlet without passing through the dispatcher by specifing it in the URL path. In the diagram the dependancy +dispatched shows how the WCS Dispatcher invokes one of the WCS Response Servlets. For the WCS Service we have three Response Servlets:
Each Response Servlet inherits from the base class org.vfny.geoserver.wcs.servlets.WCService which extends the abstract class org.vfny.geoserver.servlets.AbstractService. Those Servlets catch an org.vfny.geoserver.wcs.requests.WCSRequest object extension of the abstract class org.vfny.geoserver.Request class. Each request object is then passed to an istance of a specific response object used by the Servlets to build up the response output. In the diagram the relation +request between responses and requests underlines this kind of dependency. All the response objects are implementations of the interface org.vfny.geoserver.Response. Each response instance builds the response output using the GeoServer data configuration (see the GeoServer Configuration design for more details) and then sends the result to the OutputStream through the writeTo() method. Lets take a look at the org.vfny.geoserver.wcs.responses.CoverageResponse object. This is a particular case of a response object. In such case the output depends on the requested output-format so the response can be built in different ways. To achieve this objective the CoverageResponse object creates an instance of a response delegate through the org.vfny.geoserver.wcs.responses.CoverageResponseDelegateFactory class. The goal of this class is to retrieve and instantiate the right object for the requested output-format. In the diagram the relation +delegate between CoverageResponse and CoverageResponseDelegate represents this kind of dependency.
GeoServer WCS.jpg (image/pjpeg)
|
Document generated by Confluence on Jan 16, 2008 23:26 |