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