org.geotools.data.wfs.protocol.http
Class SimpleHttpProtocol

java.lang.Object
  extended by org.geotools.data.wfs.protocol.http.AbstractHttpProtocol
      extended by org.geotools.data.wfs.protocol.http.SimpleHttpProtocol
All Implemented Interfaces:
HTTPProtocol

public class SimpleHttpProtocol
extends AbstractHttpProtocol

An HTTPProtocol implementation that relies on plain HttpURLConnection

Since:
2.6.x
Version:
$Id: SimpleHttpProtocol.java 35067 2010-03-20 05:41:02Z jive $
Author:
Gabriel Roldan (OpenGeo)

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.geotools.data.wfs.protocol.http.HTTPProtocol
HTTPProtocol.POSTCallBack
 
Field Summary
 
Fields inherited from class org.geotools.data.wfs.protocol.http.AbstractHttpProtocol
authPassword, authUsername, LOGGER, timeoutMillis
 
Constructor Summary
SimpleHttpProtocol()
           
 
Method Summary
 HTTPResponse issueGet(java.net.URL baseUrl, java.util.Map<java.lang.String,java.lang.String> kvp)
          Issues an HTTP request over the baseUrl with a query string defined by the kvp key/value pair of parameters.
 HTTPResponse issuePost(java.net.URL targetUrl, HTTPProtocol.POSTCallBack callback)
           
 
Methods inherited from class org.geotools.data.wfs.protocol.http.AbstractHttpProtocol
createUri, createUrl, getTimeoutMillis, isTryGzip, setAuth, setTimeoutMillis, setTryGzip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleHttpProtocol

public SimpleHttpProtocol()
Method Detail

issueGet

public HTTPResponse issueGet(java.net.URL baseUrl,
                             java.util.Map<java.lang.String,java.lang.String> kvp)
                      throws java.io.IOException
Description copied from interface: HTTPProtocol
Issues an HTTP request over the baseUrl with a query string defined by the kvp key/value pair of parameters.

If the base url query is not empty and already contains a parameter named as one of the parameters in kvp, the original parameter value in the baseUrl query is overriden by the one in the kvp map. For this purpose, the parameter name matching comparison is made case insensitively.

Parameters:
baseUrl - the URL where to fetch the contents from
kvp - the set of key/value pairs to create the actual URL query string, may be empty
Returns:
the server response of issuing the HTTP request through GET method
Throws:
java.io.IOException - if a communication error of some sort occurs
See Also:
HTTPProtocol.createUrl(URL, Map)

issuePost

public HTTPResponse issuePost(java.net.URL targetUrl,
                              HTTPProtocol.POSTCallBack callback)
                       throws java.io.IOException
Throws:
java.io.IOException


Copyright © 1996-2010 Geotools. All Rights Reserved.