com.atlassian.confluence.util.http
Interface HttpRetrievalService

All Known Implementing Classes:
BaseHttpRetrievalService

public interface HttpRetrievalService


Field Summary
static int DEFAULT_MAX_CACHE_AGE
           
static int DEFAULT_MAX_DOWNLOAD_SIZE
           
static String HTTP_INCLUDE_STACK_HEADER
           
static int HTTP_INCLUDE_STACK_MAX_DEPTH
           
static String HTTP_USER_AGENT_STRING
           
 
Method Summary
 HttpResponse get(HttpRequest request)
          Retrieve a URL using custom HttpRequest settings
 HttpResponse get(String url)
          Retrieve a URL using the default HttpRequest settings for that URL.
 Class[] getAvailableAuthenticators()
          Retrieve the list of authenticators that can be used with this HttpRetrievalService
 HttpRequest getDefaultRequestFor(String url)
          Retrieve the default configured HttpRequest for a particular URL.
 HttpRetrievalServiceConfig getHttpRetrievalServiceConfig()
          Retrieve the configuration for this service
 void setHttpRetrievalServiceConfig(HttpRetrievalServiceConfig config)
          Overwrite the configuration for this service
 

Field Detail

DEFAULT_MAX_DOWNLOAD_SIZE

public static final int DEFAULT_MAX_DOWNLOAD_SIZE
See Also:
Constant Field Values

DEFAULT_MAX_CACHE_AGE

public static final int DEFAULT_MAX_CACHE_AGE
See Also:
Constant Field Values

HTTP_INCLUDE_STACK_HEADER

public static final String HTTP_INCLUDE_STACK_HEADER
See Also:
Constant Field Values

HTTP_INCLUDE_STACK_MAX_DEPTH

public static final int HTTP_INCLUDE_STACK_MAX_DEPTH
See Also:
Constant Field Values

HTTP_USER_AGENT_STRING

public static final String HTTP_USER_AGENT_STRING
See Also:
Constant Field Values
Method Detail

get

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

Parameters:
url - the URL to retrieve
Returns:
a response object encapsulating the result of the request
Throws:
IOException - if the retrieval fails

get

public HttpResponse get(HttpRequest request)
                 throws IOException
Retrieve a URL using custom HttpRequest settings

Parameters:
request - the request we want to make
Returns:
a response object encapsulating the result of the request
Throws:
IOException - if the retrieval fails

getDefaultRequestFor

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

Parameters:
url - the URL that is going to be retrieved
Returns:
the system default HttpRequest for that URL.

getAvailableAuthenticators

public Class[] getAvailableAuthenticators()
Retrieve the list of authenticators that can be used with this HttpRetrievalService

Returns:
the list of authenticators that can be used with this HttpRetrievalService

getHttpRetrievalServiceConfig

public HttpRetrievalServiceConfig getHttpRetrievalServiceConfig()
Retrieve the configuration for this service

Returns:
the service configuration

setHttpRetrievalServiceConfig

public void setHttpRetrievalServiceConfig(HttpRetrievalServiceConfig config)
Overwrite the configuration for this service

Parameters:
config - the service configuration to save


Confluence is developed by Atlassian.