Java Doc for AbstractOpenWebService.java in  » GIS » GeoTools-2.4.1 » org » geotools » data » ows » 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 » GeoTools 2.4.1 » org.geotools.data.ows 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.geotools.data.ows.AbstractOpenWebService

All known Subclasses:   org.geotools.data.wms.WebMapServer,
AbstractOpenWebService
abstract public class AbstractOpenWebService (Code)
This abstract class provides a building block for one to implement an Open Web Service (OWS) client. Each OWS is usually defined by an OGC specification, available at http://www.opengeospatial.org. This class provides version negotiation, Capabilities document retrieval, and a request/response infrastructure. Implementing subclasses need to provide their own Specifications (representing versions of the OWS to be implemented) and their own request/response instances.
author:
   Richard Gould


Field Summary
protected  Capabilitiescapabilities
    
final protected  URLserverURL
    
protected  Specificationspecification
    
protected  Specification[]specs
    

Constructor Summary
public  AbstractOpenWebService(URL serverURL)
     Set up the specifications used and retrieve the Capabilities document given by serverURL.
public  AbstractOpenWebService(Capabilities capabilties, URL serverURL)
    

Method Summary
 Stringafter(List known, String version)
    
 Stringbefore(List known, String version)
    
protected  ResponseinternalIssueRequest(Request request)
     Issues a request to the server and returns that server's response.
public  GetCapabilitiesResponseissueRequest(GetCapabilitiesRequest request)
    
protected  CapabilitiesnegotiateVersion()
    

Version number negotiation occurs as follows (credit OGC):

  • 1) If the server implements the requested version number, the server shall send that version.
  • 2a) If a version unknown to the server is requested, the server shall send the highest version less than the requested version.
  • 2b) If the client request is for a version lower than any of those known to the server, then the server shall send the lowest version it knows.
  • 3a) If the client does not understand the new version number sent by the server, it may either cease communicating with the server or send a new request with a new version number that the client does understand but which is less than that sent by the server (if the server had responded with a lower version).
  • 3b) If the server had responded with a higher version (because the request was for a version lower than any known to the server), and the client does not understand the proposed higher version, then the client may send a new request with a version number higher than that sent by the server.

The OGC tells us to repeat this process (or give up).

public  voidsetLoggingLevel(Level newLevel)
    
abstract protected  voidsetupSpecifications()
     Sets up the specifications/versions that this server is capable of communicating with.

Field Detail
capabilities
protected Capabilities capabilities(Code)



serverURL
final protected URL serverURL(Code)



specification
protected Specification specification(Code)



specs
protected Specification[] specs(Code)
Contains the specifications that are to be used with this service




Constructor Detail
AbstractOpenWebService
public AbstractOpenWebService(URL serverURL) throws IOException, ServiceException(Code)
Set up the specifications used and retrieve the Capabilities document given by serverURL.
Parameters:
  serverURL - a URL that points to the capabilities document of a server
throws:
  IOException - if there is an error communicating with the server
throws:
  ServiceException - if the server responds with an error



AbstractOpenWebService
public AbstractOpenWebService(Capabilities capabilties, URL serverURL)(Code)




Method Detail
after
String after(List known, String version)(Code)
Utility method returning the known version, just after the provided version
Parameters:
  known - a List of all known versions
Parameters:
  version - the boundary condition a version just after the provided boundary condition



before
String before(List known, String version)(Code)
Utility method returning the known version, just before the provided version
Parameters:
  known - List of all known versions
Parameters:
  version - the boundary condition the version just below the provided boundary version



internalIssueRequest
protected Response internalIssueRequest(Request request) throws IOException, ServiceException(Code)
Issues a request to the server and returns that server's response. It asks the server to send the response gzipped to provide a faster transfer time.
Parameters:
  request - the request to be issued a response from the server, which is created according to the specific Request
throws:
  IOException - if there was a problem communicating with the server
throws:
  ServiceException - if the server responds with an exception or returns bad content



issueRequest
public GetCapabilitiesResponse issueRequest(GetCapabilitiesRequest request) throws IOException, ServiceException(Code)



negotiateVersion
protected Capabilities negotiateVersion() throws IOException, ServiceException(Code)

Version number negotiation occurs as follows (credit OGC):

  • 1) If the server implements the requested version number, the server shall send that version.
  • 2a) If a version unknown to the server is requested, the server shall send the highest version less than the requested version.
  • 2b) If the client request is for a version lower than any of those known to the server, then the server shall send the lowest version it knows.
  • 3a) If the client does not understand the new version number sent by the server, it may either cease communicating with the server or send a new request with a new version number that the client does understand but which is less than that sent by the server (if the server had responded with a lower version).
  • 3b) If the server had responded with a higher version (because the request was for a version lower than any known to the server), and the client does not understand the proposed higher version, then the client may send a new request with a version number higher than that sent by the server.

The OGC tells us to repeat this process (or give up). This means we are actually going to come up with a bit of setup cost in figuring out our GetCapabilities request. This means that it is possible that we may make multiple requests before being satisfied with a response. Also, if we are unable to parse a given version for some reason, for example, malformed XML, we will request a lower version until we have run out of versions to request with. Thus, a server that does not play nicely may take some time to parse and might not even succeed. a capabilities object that represents the Capabilities on the server
throws:
  IOException - if there is an error communicating with the server, or the XML cannot be parsed
throws:
  ServiceException - if the server returns a ServiceException




setLoggingLevel
public void setLoggingLevel(Level newLevel)(Code)



setupSpecifications
abstract protected void setupSpecifications()(Code)
Sets up the specifications/versions that this server is capable of communicating with.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.