- java.lang.Object
-
- com.pervasive.datarush.net.NetworkConfiguration
-
public final class NetworkConfiguration extends Object
Specifies the network configuration to use.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NetworkConfiguration.ConnectType
-
Field Summary
Fields Modifier and Type Field Description static NetworkConfiguration
DIRECT
A direct connection with default settings
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NetworkConfiguration.ConnectType
connectionType()
Returns the type of connection to use in order to connectint
maxConnectRetries()
Returns the maximum number of retries to use when connecting.String
proxyHost()
Returns the proxy host to use when connecting.int
proxyPort()
Returns the proxy port to use when connecting.static NetworkConfiguration
socksProxy(String proxyHost, int proxyPort)
Returns a socks proxy configurationNetworkConfiguration
withMaxConnectRetries(int maxConnectRetries)
Specifies the maximum number of retries to use when connecting.
-
-
-
Field Detail
-
DIRECT
public static NetworkConfiguration DIRECT
A direct connection with default settings
-
-
Method Detail
-
socksProxy
public static NetworkConfiguration socksProxy(String proxyHost, int proxyPort)
Returns a socks proxy configuration- Parameters:
proxyHost
- the proxy hostproxyPort
- the proxy port- Returns:
- the network configuration configured for socks proxy
-
connectionType
public NetworkConfiguration.ConnectType connectionType()
Returns the type of connection to use in order to connect- Returns:
- the type of connection
-
proxyHost
public String proxyHost()
Returns the proxy host to use when connecting. This setting is ignored unless type isNetworkConfiguration.ConnectType.SOCKS_PROXY
.- Returns:
- the proxy host
-
proxyPort
public int proxyPort()
Returns the proxy port to use when connecting. This setting is ignored unless type isNetworkConfiguration.ConnectType.SOCKS_PROXY
.- Returns:
- the proxy port
-
maxConnectRetries
public int maxConnectRetries()
Returns the maximum number of retries to use when connecting. The default is 10.- Returns:
- the maximum number of retries
-
withMaxConnectRetries
public NetworkConfiguration withMaxConnectRetries(int maxConnectRetries)
Specifies the maximum number of retries to use when connecting. The default is 10- Parameters:
maxConnectRetries
- the maximum number of retries- Returns:
- a new network configuration with the specified number of max retries
-
-