net.krecan.m2_proxy.repository.httpclient
Class HttpClientRepository
java.lang.Object
net.krecan.m2_proxy.repository.httpclient.HttpClientRepository
- All Implemented Interfaces:
- Repository
public class HttpClientRepository
- extends Object
- implements Repository
HttpClient backed repository implementation.
- Author:
- krel
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HttpClientRepository
public HttpClientRepository()
loadResource
public Resource loadResource(String logicalName)
throws IOException
- Description copied from interface:
Repository
- Loads resources. When the resource can not be loaded, returns null
- Specified by:
loadResource
in interface Repository
- Returns:
- returns resource
- Throws:
IOException
downloadResource
protected Resource downloadResource(String logicalName,
String pathToResource,
int redirectLevel)
throws IOException,
org.apache.commons.httpclient.HttpException
- Downloads resource, handles redirects
- Parameters:
logicalName
- pathToResource
-
- Returns:
-
- Throws:
IOException
org.apache.commons.httpclient.HttpException
isRedirect
protected boolean isRedirect(int response)
getBaseUrl
public URL getBaseUrl()
setBaseUrl
public void setBaseUrl(URL baseUrl)
getHttpClient
public org.apache.commons.httpclient.HttpClient getHttpClient()
setHttpClient
public void setHttpClient(org.apache.commons.httpclient.HttpClient httpClient)
getMaxRedirects
public int getMaxRedirects()
setMaxRedirects
public void setMaxRedirects(int maxRedirects)
Copyright © 2006 null. All Rights Reserved.