Class SetupHttpClientRequestFactory

  • 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 SetupHttpClientRequestFactory
    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:
    7.0.1
    • Constructor Detail

      • SetupHttpClientRequestFactory

        public SetupHttpClientRequestFactory​(org.springframework.aop.Advisor classLoaderAdvisor)
    • 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.