|
3.0.2: 2012-01-25 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.basedb.util.uri.http.HttpConnectionManager
public class HttpConnectionManager
Connection manager implementation that support HTTP and HTTPS URI:s. It supports Basic and Digest authentication schemes. When HTTPS is used it provides support for validation of both server- and client-side certificates.
Nested Class Summary | |
---|---|
static class |
HttpConnectionManager.CloseableHttpClient
Closable implementation that closes the given HttpClient when the close() method is called. |
Field Summary | |
---|---|
private UriMetadata |
metadata
|
private ConnectionParameters |
parameters
|
private URI |
uri
|
Constructor Summary | |
---|---|
HttpConnectionManager(URI uri,
ConnectionParameters parameters)
|
Method Summary | |
---|---|
org.apache.http.client.HttpClient |
createHttpClient(URI uri,
ConnectionParameters parameters)
Get a HttpClient object that has been configured to access the given URI. |
UriMetadata |
createMetadata(URI uri,
org.apache.http.HttpResponse response)
Read metadata from the given http response and put the information in a UriMetadata object. |
InputStream |
getInputStream()
Get an InputStream for reading the contents of the resource. |
UriMetadata |
getMetadata()
Get metadata about the resource. |
URI |
getURI()
Get the URI of the resource we are interested in. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final URI uri
private final ConnectionParameters parameters
private UriMetadata metadata
Constructor Detail |
---|
public HttpConnectionManager(URI uri, ConnectionParameters parameters)
Method Detail |
---|
public URI getURI()
ConnectionManager
getURI
in interface ConnectionManager
public InputStream getInputStream() throws IOException
ConnectionManager
getInputStream
in interface ConnectionManager
IOException
- If there is an error creating the streampublic UriMetadata getMetadata() throws IOException
ConnectionManager
getMetadata
in interface ConnectionManager
IOException
- If there is an error getting the metadatapublic org.apache.http.client.HttpClient createHttpClient(URI uri, ConnectionParameters parameters) throws IOException
IOException
public UriMetadata createMetadata(URI uri, org.apache.http.HttpResponse response)
|
3.0.2: 2012-01-25 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |