public class GXLoadBalancer
extends java.lang.Object
Constructor and Description |
---|
GXLoadBalancer() |
GXLoadBalancer(java.lang.String fileName) |
GXLoadBalancer(java.lang.String[] serversURLs) |
Modifier and Type | Method and Description |
---|---|
void |
addServerURL(java.lang.String serverURL)
Adds a server's URL to the list of possible servers to connect.
|
java.lang.String |
getAvailableServer()
A separate thread is instantiated for every server on the list.
|
java.lang.String[] |
getServers()
Returns the list of possible servers to connect.
|
long |
getWaitForResponseTimeout()
Returns a response timeout, which is the time limit for waiting for servers load
factor responses.
|
void |
removeAllServerURLs()
Cleans the list of server urls.
|
void |
setConfigFile(java.lang.String configFile)
Sets a configuration file from which server URLs will be taken.
|
void |
setServers(java.lang.String[] serverURLs)
Sets the list of possible servers to connect.
|
void |
setWaitForResponseTimeout(long timeout)
Sets a response timeout, to limit the time to wait for servers load factor responses.
|
public GXLoadBalancer()
public GXLoadBalancer(java.lang.String[] serversURLs)
public GXLoadBalancer(java.lang.String fileName)
public void addServerURL(java.lang.String serverURL)
serverURL
- The server's URLpublic java.lang.String[] getServers()
public void setServers(java.lang.String[] serverURLs)
serverURLs
- An array with the servers' URLspublic void removeAllServerURLs()
public void setConfigFile(java.lang.String configFile)
configFile
- The full path of the configuration filepublic void setWaitForResponseTimeout(long timeout)
timeout
- The timeout in millisecondspublic long getWaitForResponseTimeout()
public java.lang.String getAvailableServer()
Copyright 2014 Software AG. All rights reserved. Use is subject to license terms.