Java Doc for WcsDispatcher.java in  » GIS » GeoServer » org » vfny » geoserver » wcs » servlets » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoServer » org.vfny.geoserver.wcs.servlets 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.vfny.geoserver.servlets.Dispatcher
   org.vfny.geoserver.wcs.servlets.WcsDispatcher

WcsDispatcher
public class WcsDispatcher extends Dispatcher (Code)
Routes requests made at the top-level URI to appropriate interface servlet. Note that the logic of this method could be generously described as 'loose.' It is not checking for request validity in any way (this is done by the reqeust- specific servlets). Rather, it is attempting to make a reasonable guess as to what servlet to call, given that the client is routing to the top level URI as opposed to the request-specific URI, as specified in the GetCapabilities response. Thus, this is a convenience method, which allows for some slight client laziness and helps explain to lost souls/spiders what lives at the URL. Due to the string parsing, it is much faster (and recommended) to use the URIs specified in the GetCapabablities response. Currently does not support post requests, but most requests for this will likely come with get.
author:
   $Author: Alessio Fabiani (alessio.fabiani@gmail.com) $ (last modification)
author:
   $Author: Simone Giannecchini (simboss1@gmail.com) $ (last modification)
version:
   $Id: WcsDispatcher.java 7746 2007-11-13 15:38:35Z aaime $




Method Summary
public  voiddoGet(HttpServletRequest request, HttpServletResponse response)
     Handles all Get requests.
public  voiddoPost(HttpServletRequest request, HttpServletResponse response)
     This figures out a dispatched post request.
protected  voiddoResponse(Reader requestReader, HttpServletRequest request, HttpServletResponse response, int req_type)
     Does the actual response, creates the appropriate servlet to handle the detected request.



Method Detail
doGet
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code)
Handles all Get requests. This method implements the main matching logic for the class.
Parameters:
  request - The servlet request object.
Parameters:
  response - The servlet response object.
throws:
  ServletException - For any servlet problems.
throws:
  IOException - For any io problems.



doPost
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code)
This figures out a dispatched post request. It writes the request to a temp file, and then reads it in twice from there. I found no other way to do this, but this solution doesn't seem to bad. Obviously it is better to use the servlets directly, without having to go through this random file writing and reading. If our xml handlers were written more dynamically this probably wouldn't be necessary, but it is. Hopefully this should help GeoServer's interoperability with clients, since most of them are kinda stupid, and can't handle different url locations for the different requests.
Parameters:
  request - The servlet request object.
Parameters:
  response - The servlet response object.
throws:
  ServletException - For any servlet problems.
throws:
  IOException - For any io problems.



doResponse
protected void doResponse(Reader requestReader, HttpServletRequest request, HttpServletResponse response, int req_type) throws ServletException, IOException(Code)
Does the actual response, creates the appropriate servlet to handle the detected request. Note that the requestReader is a bit of a hack, if it is null then it is from a get Request, if not then that means the request is being stored as a file, and needs to be read with this particular reader.

This does have the downside of forcing us to have doGet and doPost methods of AbstractService be public, perhaps there is a good pattern for handling this. Or we could try to re-write Dispatcher to extend AbstractService, but it may be tricky.


Parameters:
  requestReader - The reader of a file that contains the request,null if from a get request.
Parameters:
  request - The http request that was made.
Parameters:
  response - The response to be returned.
Parameters:
  req_type - The request type.
throws:
  ServletException - for any problems.
throws:
  IOException - If anything goes wrong reading or writing.



Fields inherited from org.vfny.geoserver.servlets.Dispatcher
final public static int DESCRIBE_FEATURE_TYPE_REQUEST(Code)(Java Doc)
final public static int DESCRIBE_LAYER_REQUEST(Code)(Java Doc)
final public static int ERROR(Code)(Java Doc)
final public static int GET_CAPABILITIES_REQUEST(Code)(Java Doc)
final public static int GET_FEATURE_INFO_REQUEST(Code)(Java Doc)
final public static int GET_FEATURE_LOCK_REQUEST(Code)(Java Doc)
final public static int GET_FEATURE_REQUEST(Code)(Java Doc)
final public static int GET_LEGEND_GRAPHIC_REQUEST(Code)(Java Doc)
final public static int GET_MAP_REQUEST(Code)(Java Doc)
final public static int LOCK_REQUEST(Code)(Java Doc)
public static String META_REQUEST(Code)(Java Doc)
final public static int TRANSACTION_REQUEST(Code)(Java Doc)
final public static int UNKNOWN(Code)(Java Doc)
final public static short WFS_SERVICE(Code)(Java Doc)
final public static short WMS_SERVICE(Code)(Java Doc)
protected ServletConfig servletConfig(Code)(Java Doc)

Methods inherited from org.vfny.geoserver.servlets.Dispatcher
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code)(Java Doc)
public void init(ServletConfig config) throws ServletException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.