Class Configuration.NetworkSettings
- Enclosing class:
Configuration
An object containing network settings data.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionsetAuthenticationCredentials
(Configuration.HttpCredentials... authenticationCredentials) Enables access to resources that are secured via HTTP authentication.setConnectTimeout
(Integer connectTimeout) Sets a timeout in milliseconds for connecting to resources, such as HTTP requests to style sheets, images etc.setCookiePolicy
(Configuration.CookiePolicy cookiePolicy) Specifies the cookie handling policy.setCookies
(Configuration.Cookie... cookies) Adds cookies to outgoing HTTP connections.setReadTimeout
(Integer readTimeout) Sets a timeout in milliseconds for reading resources, such as HTTP requests to style sheets, images etc.setRequestHeaders
(Configuration.KeyValuePair... requestHeaders) Sets request headers to all outgoing HTTP connections.
-
Constructor Details
-
NetworkSettings
public NetworkSettings()
-
-
Method Details
-
setRequestHeaders
public Configuration.NetworkSettings setRequestHeaders(Configuration.KeyValuePair... requestHeaders) Sets request headers to all outgoing HTTP connections. If the key already exists, the pair is overwritten.
- Returns:
- The current
Configuration
instance.
-
setCookies
Adds cookies to outgoing HTTP connections.
- Returns:
- The current
Configuration
instance.
-
setAuthenticationCredentials
public Configuration.NetworkSettings setAuthenticationCredentials(Configuration.HttpCredentials... authenticationCredentials) Enables access to resources that are secured via HTTP authentication.
- Returns:
- The current
Configuration
instance.
-
setConnectTimeout
Sets a timeout in milliseconds for connecting to resources, such as HTTP requests to style sheets, images etc. If the connection could not be established until the timeout expires, the request will be aborted and the resource will not be loaded.
A timeout of 0 means that the connection will not time out. A negative value means that no timeout will be set. The default value is 60000 (1min).
- Returns:
- The current
Configuration
instance.
-
setReadTimeout
Sets a timeout in milliseconds for reading resources, such as HTTP requests to style sheets, images etc. If the download does not start until the timeout expires, the request will be aborted and the resource will not be loaded.
A timeout of 0 means that the download will not time out. A negative value means that no timeout will be set. The default value is 60000 (1min).
- Returns:
- The current
Configuration
instance.
-
setCookiePolicy
Specifies the cookie handling policy. By default, the policy is browser-like.- Returns:
- The current
Configuration
instance.
-