Class Configuration.NetworkSettings

java.lang.Object
com.realobjects.pdfreactor.Configuration.NetworkSettings
Enclosing class:
Configuration

public static final class Configuration.NetworkSettings extends Object

An object containing network settings data.

  • 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

      public Configuration.NetworkSettings setCookies(Configuration.Cookie... cookies)

      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

      public Configuration.NetworkSettings setConnectTimeout(Integer connectTimeout)

      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

      public Configuration.NetworkSettings setReadTimeout(Integer readTimeout)

      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

      public Configuration.NetworkSettings setCookiePolicy(Configuration.CookiePolicy cookiePolicy)
      Specifies the cookie handling policy. By default, the policy is browser-like.
      Returns:
      The current Configuration instance.