public class MultiConnectionConfig extends Object
LiveViewMultiConnection.| Constructor and Description | 
|---|
MultiConnectionConfig(List<ConnectionConfig> configs,
                     MultiConnectionListener listener)
Use this constructor if you need to configure the servers differently. 
 | 
MultiConnectionConfig(List<String> uris,
                     String username,
                     String password,
                     MultiConnectionListener listener)
Use this constructor if the servers all use the same username and password (which can be null) 
 | 
| Modifier and Type | Method and Description | 
|---|---|
List<ConnectionConfig> | 
getConfigs()  | 
ConnectionMode | 
getConnectionMode()  | 
MultiConnectionListener | 
getListener()  | 
int | 
getMaxRandomReconnectDelaySeconds()  | 
long | 
getRetryIntervalMillis()  | 
long | 
getTimeoutMillis()
The amount of time to consider a connection attempt failed. 
 | 
void | 
setClientCapabilities(EnumSet<LiveViewClientCapability> capabilities)
Declare your client capabilities to be something less than the current default. 
 | 
void | 
setConnectionMode(ConnectionMode connectionMode)  | 
void | 
setListener(MultiConnectionListener listener)  | 
void | 
setMaxRandomReconnectDelaySeconds(int maxRandomReconnectDelaySeconds)
When any connection with queries is lost, The LiveViewMultiConnection will wait a random amount of time
 from 0 to this value in seconds before trying to reconnect those queries to another server. 
 | 
void | 
setRetryIntervalMillis(long retryIntervalMillis)
This is the wait between retry attempts. 
 | 
void | 
setTimeoutMillis(long timeoutMillis)
The amount of time to consider a connection attempt failed. 
 | 
public MultiConnectionConfig(List<ConnectionConfig> configs, MultiConnectionListener listener)
configs - the List of ConnectionConfigs.listener - if you want to be notified of connection events.  May be null.public MultiConnectionConfig(List<String> uris, String username, String password, MultiConnectionListener listener) throws LiveViewException
uris - the uris to the serversusername - the username on all the servers.  May be null.password - password on all the servers.  May be null.listener - if you want to be notified of connection events.  May be null.{@link - LiveViewException}LiveViewExceptionpublic List<ConnectionConfig> getConfigs()
public MultiConnectionListener getListener()
public void setListener(MultiConnectionListener listener)
listener - the listener to setpublic ConnectionMode getConnectionMode()
public void setConnectionMode(ConnectionMode connectionMode)
connectionMode - the connectionMode to setpublic long getTimeoutMillis()
public void setTimeoutMillis(long timeoutMillis)
timeoutMillis - the timeout duration in milliseconds.public void setClientCapabilities(EnumSet<LiveViewClientCapability> capabilities)
capabilities - LiveViewClientCapability.CURRENT_LV_CLIENT_CAPABILITYpublic long getRetryIntervalMillis()
public void setRetryIntervalMillis(long retryIntervalMillis)
retryIntervalMillis - the retryIntervalMillis to set.  10 ms is the minimum accepted.public int getMaxRandomReconnectDelaySeconds()
public void setMaxRandomReconnectDelaySeconds(int maxRandomReconnectDelaySeconds)
maxRandomReconnectDelaySeconds - the maxRandomReconnectDelaySeconds to setCopyright © 2015–2019 Cloud Software Group, Inc.. All rights reserved.