com.atlassian.confluence.util.http
Class BaseHttpRetrievalService

java.lang.Object
  extended by com.atlassian.confluence.util.http.BaseHttpRetrievalService
All Implemented Interfaces:
HttpRetrievalService
Direct Known Subclasses:
HttpClientHttpRetrievalService

public abstract class BaseHttpRetrievalService
extends Object
implements HttpRetrievalService


Field Summary
 
Fields inherited from interface com.atlassian.confluence.util.http.HttpRetrievalService
DEFAULT_MAX_CACHE_AGE, DEFAULT_MAX_DOWNLOAD_SIZE, HTTP_INCLUDE_STACK_HEADER, HTTP_INCLUDE_STACK_MAX_DEPTH, HTTP_USER_AGENT_STRING
 
Constructor Summary
BaseHttpRetrievalService()
           
 
Method Summary
 HttpResponse get(String url)
          Retrieve a URL using the default HttpRequest settings for that URL.
 ConfluenceHttpParameters getConnectionParameters()
           
 HttpRequest getDefaultRequestFor(String url)
          Retrieve the default configured HttpRequest for a particular URL.
 HttpRetrievalServiceConfig getHttpRetrievalServiceConfig()
          Retrieve the configuration for this service
 void setBandanaManager(com.atlassian.bandana.BandanaManager bandanaManager)
           
 void setHttpRetrievalServiceConfig(HttpRetrievalServiceConfig config)
          Overwrite the configuration for this service
 void setSettingsManager(SettingsManager settingsManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.confluence.util.http.HttpRetrievalService
get, getAvailableAuthenticators
 

Constructor Detail

BaseHttpRetrievalService

public BaseHttpRetrievalService()
Method Detail

get

public HttpResponse get(String url)
                 throws IOException
Description copied from interface: HttpRetrievalService
Retrieve a URL using the default HttpRequest settings for that URL. The equivalent of calling get(service.getDefaultRequestFor(url));

Specified by:
get in interface HttpRetrievalService
Parameters:
url - the URL to retrieve
Returns:
a response object encapsulating the result of the request
Throws:
IOException - if the retrieval fails

getDefaultRequestFor

public HttpRequest getDefaultRequestFor(String url)
Description copied from interface: HttpRetrievalService
Retrieve the default configured HttpRequest for a particular URL. Will come prepackaged with the configured system defaults for authentication, retrieval size and caching.

Specified by:
getDefaultRequestFor in interface HttpRetrievalService
Parameters:
url - the URL that is going to be retrieved
Returns:
the system default HttpRequest for that URL.

getHttpRetrievalServiceConfig

public HttpRetrievalServiceConfig getHttpRetrievalServiceConfig()
Description copied from interface: HttpRetrievalService
Retrieve the configuration for this service

Specified by:
getHttpRetrievalServiceConfig in interface HttpRetrievalService
Returns:
the service configuration

getConnectionParameters

public ConfluenceHttpParameters getConnectionParameters()

setHttpRetrievalServiceConfig

public void setHttpRetrievalServiceConfig(HttpRetrievalServiceConfig config)
Description copied from interface: HttpRetrievalService
Overwrite the configuration for this service

Specified by:
setHttpRetrievalServiceConfig in interface HttpRetrievalService
Parameters:
config - the service configuration to save

setBandanaManager

public void setBandanaManager(com.atlassian.bandana.BandanaManager bandanaManager)

setSettingsManager

public void setSettingsManager(SettingsManager settingsManager)


Copyright © 2003–2015 Atlassian. All rights reserved.