public class HttpProvider extends UrlProvider
UrlProvider content source, but this expects the URL to use
the HTTP protocol. This provides the ability to go through an HTTP proxy.| Constructor and Description |
|---|
HttpProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureProxy(org.apache.commons.httpclient.HttpClient client)
If proxy information was specified, configures the client to use it.
|
protected InputStream |
getIndexInputStream()
Returns the stream that contains the
index file content. |
InputStream |
getInputStream(String location) |
protected InputStream |
getInputStreamForUrl(URL url)
Given any URL, will return a stream to that URL using the HTTP client and GET method
for the authentication as defined in this content source's configuration.
|
void |
initialize(Configuration configuration) |
protected void |
prepareHttpClient(org.apache.commons.httpclient.HttpClient client,
org.apache.commons.httpclient.HttpMethodBase method)
Given a client and the method to be used by that client, this will prepare those objects
so they can be used to get the remote content.
|
protected void |
setIndexUrl(URL url) |
protected void |
setRootUrl(URL url) |
void |
shutdown() |
void |
testConnection() |
createPackage, determinePackageType, findPackage, getIndexUrl, getRemotePackageInfosFromIndex, getRootUrl, getRootUrlString, getSupportedPackageTypes, getSyncProgressWeight, initializePackageTypes, setSupportedPackageTypes, synchronizePackages, syncPackageprotected void setRootUrl(URL url)
setRootUrl in class UrlProviderprotected void setIndexUrl(URL url)
setIndexUrl in class UrlProviderpublic void initialize(Configuration configuration) throws Exception
initialize in interface ContentProviderinitialize in class UrlProviderExceptionpublic void shutdown()
shutdown in interface ContentProvidershutdown in class UrlProviderpublic void testConnection()
throws Exception
testConnection in interface ContentProvidertestConnection in class UrlProviderExceptionpublic InputStream getInputStream(String location) throws Exception
getInputStream in interface PackageSourcegetInputStream in class UrlProviderExceptionprotected InputStream getIndexInputStream() throws Exception
UrlProviderindex file content.getIndexInputStream in class UrlProviderExceptionprotected InputStream getInputStreamForUrl(URL url) throws Exception
url - the URL whose stream of content is returnedException - if cannot get the streamed contentprotected void prepareHttpClient(org.apache.commons.httpclient.HttpClient client,
org.apache.commons.httpclient.HttpMethodBase method)
throws Exception
client - method - Exception - if the client cannot be prepared successfullyprotected void configureProxy(org.apache.commons.httpclient.HttpClient client)
client - client being used in the invocationCopyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.