Class GoodDataSettings

java.lang.Object
com.gooddata.sdk.service.GoodDataSettings

public class GoodDataSettings extends Object
Gather various additional settings of GoodData. Can be passed to the GoodData constructor to tune up its behaviour.

Settings are applied only once at the beginning. Changing this bean after it's passed to GoodData has no effect.

  • Constructor Details

    • GoodDataSettings

      public GoodDataSettings()
  • Method Details

    • getMaxConnections

      public int getMaxConnections()
      Maximum number of connection used
      Returns:
      maximum number of connection used
    • setMaxConnections

      public void setMaxConnections(int maxConnections)
      Set maximum number of connections used. This applies same for connections per host as for total connections. (As we assume GoodData connects to single host).

      The default value is 20.

      Parameters:
      maxConnections - maximum number of connections used.
    • setConnectionTimeoutSeconds

      public void setConnectionTimeoutSeconds(int connectionTimeout)
      Set timeout seconds until connection established.

      The default value is 10 seconds.

      Set to 0 for infinite.

      Parameters:
      connectionTimeout - connection timeout seconds
    • getConnectionTimeout

      public int getConnectionTimeout()
      Milliseconds until connection established.
      Returns:
      milliseconds until connection established
    • setConnectionTimeout

      public void setConnectionTimeout(int connectionTimeout)
      Set timeout milliseconds until connection established.

      The default value is 10 seconds (10000 ms).

      Set to 0 for infinite.

      Parameters:
      connectionTimeout - connection timeout milliseconds
    • setConnectionRequestTimeoutSeconds

      public void setConnectionRequestTimeoutSeconds(int connectionRequestTimeout)
      Set timeout in seconds used when requesting a connection from the connection manager.

      The default value is 10 seconds.

      Set to 0 for infinite.

      Parameters:
      connectionRequestTimeout - connection request timeout seconds
    • getConnectionRequestTimeout

      public int getConnectionRequestTimeout()
      Returns the timeout in milliseconds used when requesting a connection from the connection manager.
      Returns:
      milliseconds used as timeout when requesting a connection from the connection manager
    • setConnectionRequestTimeout

      public void setConnectionRequestTimeout(int connectionRequestTimeout)
      Set timeout in milliseconds used when requesting a connection from the connection manager.

      The default value is 10 seconds (10000 ms).

      Set to 0 for infinite.

      Parameters:
      connectionRequestTimeout - connection request timeout milliseconds
    • setSocketTimeoutSeconds

      public void setSocketTimeoutSeconds(int socketTimeout)
      Set socket timeout (maximum period inactivity between two consecutive data packets) seconds.

      The default value is 60 seconds.

      Set to 0 for infinite.

      Parameters:
      socketTimeout - socket timeout seconds
    • getSocketTimeout

      public int getSocketTimeout()
      Milliseconds for inactivity between two consecutive data packets.
      Returns:
      milliseconds for inactivity between two consecutive data packets
    • setSocketTimeout

      public void setSocketTimeout(int socketTimeout)
      Set socket timeout (maximum period inactivity between two consecutive data packets) milliseconds.

      The default value is 60 seconds (60000 ms).

      Set to 0 for infinite.

      Parameters:
      socketTimeout - socket timeout milliseconds
    • getPollSleep

      public int getPollSleep()
      Get sleep time in milliseconds between poll retries
      See Also:
      • AbstractService.poll(PollHandler, long, TimeUnit)
    • setPollSleep

      public void setPollSleep(int pollSleep)
      Set sleep time between poll retries
      Parameters:
      pollSleep - sleep milliseconds
      See Also:
      • AbstractService.poll(PollHandler, long, TimeUnit)
    • setPollSleepSeconds

      public void setPollSleepSeconds(int pollSleep)
      Set sleep time between poll retries
      Parameters:
      pollSleep - sleep seconds
      See Also:
      • AbstractService.poll(PollHandler, long, TimeUnit)
    • getGoodDataUserAgent

      public String getGoodDataUserAgent()
      GoodData User agent
      Returns:
      user agent string formatted with default suffix (identifying the SDK)
    • getUserAgent

      public String getUserAgent()
      User agent
      Returns:
      user agent string
    • setUserAgent

      public void setUserAgent(String userAgent)
      Set custom user agent as prefix for default user agent
      Parameters:
      userAgent - user agent string
    • getRetrySettings

      public RetrySettings getRetrySettings()
    • setRetrySettings

      public void setRetrySettings(RetrySettings retrySettings)
      Set retry settings
      Parameters:
      retrySettings - retry settings
    • setPresetHeader

      public void setPresetHeader(String header, String value)
      Set preset header
      Parameters:
      header - header name
      value - header value
    • getPresetHeaders

      public Map<String,String> getPresetHeaders()
      Preset headers
      Returns:
      preset headers set by SDK on each HTTP call
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object