Package sonia.scm.net
Class HttpURLConnectionFactory
java.lang.Object
sonia.scm.net.HttpURLConnectionFactory
The
HttpURLConnectionFactory simplifies the correct configuration of HttpURLConnection.
It sets timeout, proxy, ssl and authentication configurations to provide better defaults and respect SCM-Manager
settings.
Note: This class should only be used if a third party library requires an HttpURLConnection.
In all other cases the AdvancedHttpClient should be used.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Constructor Summary
ConstructorsConstructorDescriptionHttpURLConnectionFactory(GlobalProxyConfiguration globalProxyConfiguration, jakarta.inject.Provider<TrustManager> trustManagerProvider) HttpURLConnectionFactory(GlobalProxyConfiguration globalProxyConfiguration, jakarta.inject.Provider<TrustManager> trustManagerProvider, HttpURLConnectionFactory.Connector connector, HttpURLConnectionFactory.SSLContextFactory sslContextFactory) -
Method Summary
Modifier and TypeMethodDescriptionCreates a newHttpURLConnectionfrom the given url with default options.create(URL url, HttpConnectionOptions options) Creates a newHttpURLConnectionfrom the given url and options.
-
Constructor Details
-
HttpURLConnectionFactory
@Inject public HttpURLConnectionFactory(GlobalProxyConfiguration globalProxyConfiguration, jakarta.inject.Provider<TrustManager> trustManagerProvider) -
HttpURLConnectionFactory
public HttpURLConnectionFactory(GlobalProxyConfiguration globalProxyConfiguration, jakarta.inject.Provider<TrustManager> trustManagerProvider, HttpURLConnectionFactory.Connector connector, HttpURLConnectionFactory.SSLContextFactory sslContextFactory)
-
-
Method Details
-
create
Creates a newHttpURLConnectionfrom the given url with default options.- Throws:
IOException
-
create
Creates a newHttpURLConnectionfrom the given url and options.- Throws:
IOException
-