|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectAbstractHttpProtocol
public abstract class AbstractHttpProtocol
Base class for HTTPProtocol
implementations that provides the basic property accessors
and a good implementation for the URL factory helper method createUrl(URL, Map)
modules/unsupported/wfs (gt-wfs.jar)
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface HTTPProtocol |
---|
HTTPProtocol.POSTCallBack |
Field Summary | |
---|---|
protected String |
authPassword
|
protected String |
authUsername
|
protected static Logger |
LOGGER
|
protected int |
timeoutMillis
|
Constructor Summary | |
---|---|
AbstractHttpProtocol()
|
Method Summary | |
---|---|
protected String |
createUri(URL baseUrl,
Map<String,String> queryStringKvp)
|
URL |
createUrl(URL baseUrl,
Map<String,String> queryStringKvp)
Creates an URL with baseUrl and a query string defined by the kvp key/value
pair of parameters. |
int |
getTimeoutMillis()
Returns the request timeout in milliseconds, defaults to -1 meaning no timeout |
boolean |
isTryGzip()
Returns whether gzip encoding is attempted when interacting with the HTTP server; default is false |
void |
setAuth(String username,
String password)
Sets the HTTP authentication realms (not required/used so far, but intended to be) |
void |
setTimeoutMillis(int milliseconds)
Sets the request timeout in milliseconds. |
void |
setTryGzip(boolean tryGzip)
Sets whether the server should be asked to return responses encoded in GZIP. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface HTTPProtocol |
---|
issueGet, issuePost |
Field Detail |
---|
protected static final Logger LOGGER
protected String authUsername
protected String authPassword
protected int timeoutMillis
Constructor Detail |
---|
public AbstractHttpProtocol()
Method Detail |
---|
public boolean isTryGzip()
HTTPProtocol
false
isTryGzip
in interface HTTPProtocol
true
if gzip is being attempted.HTTPProtocol.isTryGzip()
public void setTryGzip(boolean tryGzip)
HTTPProtocol
setTryGzip
in interface HTTPProtocol
tryGzip
- true
to ask the server to encode responses in GZIP.HTTPProtocol.setTryGzip(boolean)
public void setAuth(String username, String password)
HTTPProtocol
setAuth
in interface HTTPProtocol
HTTPProtocol.setAuth(String, String)
public int getTimeoutMillis()
HTTPProtocol
getTimeoutMillis
in interface HTTPProtocol
HTTPProtocol#
public void setTimeoutMillis(int milliseconds)
HTTPProtocol
setTimeoutMillis
in interface HTTPProtocol
HTTPProtocol.setTimeoutMillis(int)
public URL createUrl(URL baseUrl, Map<String,String> queryStringKvp) throws MalformedURLException
HTTPProtocol
baseUrl
and 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.
createUrl
in interface HTTPProtocol
baseUrl
- the original URL to create the new one from
baseUrl
and the query string from queryStringKvp
MalformedURLException
- if the resulting URL is not validHTTPProtocol.createUrl(URL, Map)
protected String createUri(URL baseUrl, Map<String,String> queryStringKvp)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |