Class ConfluenceHttpClientRequestFactory

  • All Implemented Interfaces:
    com.atlassian.sal.api.net.NonMarshallingRequestFactory<com.atlassian.sal.api.net.Request<?,​?>>, com.atlassian.sal.api.net.RequestFactory<com.atlassian.sal.api.net.Request<?,​?>>

    public class ConfluenceHttpClientRequestFactory
    extends AbstractHttpClientFactory
    A specialisation of the standard SAL HttpClientRequestFactory which configures the connection parameters using ConfluenceHttpParameters rather than using SAL's own defaults.

    In confluence 5.9, the system property specified by SystemPropertiesConnectionConfig.HTTP_CONNECTION_TIMEOUT_PROPERTY_NAME and SystemPropertiesConnectionConfig.HTTP_SOCKET_TIMEOUT_PROPERTY_NAME will be used to override the value in confluence, if they are provided.

    Since:
    5.7.2
    • Constructor Detail

      • ConfluenceHttpClientRequestFactory

        public ConfluenceHttpClientRequestFactory​(SettingsManager settingsManager,
                                                  org.springframework.aop.Advisor classLoaderAdvisor,
                                                  com.atlassian.bandana.BandanaManager bandanaManager1)
    • Method Detail

      • createRequest

        public com.atlassian.sal.api.net.Request createRequest​(com.atlassian.sal.api.net.Request.MethodType methodType,
                                                               String url)
        Returns:
        a request which has its connection and socket timeout set to the configured values in confluence, or the values specified by the system properties SystemPropertiesConnectionConfig.HTTP_CONNECTION_TIMEOUT_PROPERTY_NAME and SystemPropertiesConnectionConfig.HTTP_SOCKET_TIMEOUT_PROPERTY_NAME if they are set.