java.lang.Object
org.shredzone.acme4j.connector.NetworkSettings
Contains network settings to be used for network connections.
- Since:
- 2.8
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Name of the system property to control GZIP compression. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets theAuthenticator
to be used, ornull
if none is to be set.Gets theProxySelector
to be used for connections.Gets the current network timeout.boolean
Checks if HTTP compression is enabled.void
setAuthenticator
(Authenticator authenticator) Sets anAuthenticator
to be used if HTTP authentication is needed (e.g.void
setCompressionEnabled
(boolean compression) Sets if HTTP compression is enabled.void
setProxySelector
(ProxySelector proxySelector) Sets aProxySelector
that is to be used for all connections.void
setTimeout
(Duration timeout) Sets the network timeout to be used for connections.
-
Field Details
-
GZIP_PROPERTY_NAME
Name of the system property to control GZIP compression. Expects a boolean value.- See Also:
-
-
Constructor Details
-
NetworkSettings
public NetworkSettings()
-
-
Method Details
-
getProxySelector
Gets theProxySelector
to be used for connections.- Since:
- 3.0.0
-
setProxySelector
Sets aProxySelector
that is to be used for all connections. Ifnull
,HttpClient.Builder.NO_PROXY
is used, which is also the default.- Since:
- 3.0.0
-
getAuthenticator
Gets theAuthenticator
to be used, ornull
if none is to be set.- Since:
- 3.0.0
-
setAuthenticator
Sets anAuthenticator
to be used if HTTP authentication is needed (e.g. by a proxy).null
means that no authenticator shall be set.- Since:
- 3.0.0
-
getTimeout
Gets the current network timeout. -
setTimeout
Sets the network timeout to be used for connections. Defaults to 10 seconds.- Parameters:
timeout
- Network timeoutDuration
-
isCompressionEnabled
Checks if HTTP compression is enabled.- Since:
- 3.0.0
-
setCompressionEnabled
Sets if HTTP compression is enabled. It is enabled by default, but can be disabled e.g. for debugging purposes.acme4j gzip compression can also be controlled via the "org.shredzone.acme4j.gzip_compression" system property.
- Since:
- 3.0.0
-