public class HostsConfig
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
HostsConfig.Config |
Constructor and Description |
---|
HostsConfig(java.lang.String configHome,
java.lang.String fileName)
Creates a new instance of ServersConfig
|
Modifier and Type | Method and Description |
---|---|
void |
add(int id,
java.lang.String host,
int port) |
java.lang.String |
getHost(int id) |
int[] |
getHostsIds() |
java.net.InetSocketAddress |
getLocalAddress(int id) |
int |
getNum() |
int |
getPort(int id) |
java.net.InetSocketAddress |
getRemoteAddress(int id) |
int |
getServerToServerPort(int id) |
java.net.InetSocketAddress |
getServerToServerRemoteAddress(int id) |
void |
setPort(int id,
int port) |
public HostsConfig(java.lang.String configHome, java.lang.String fileName)
public void add(int id, java.lang.String host, int port)
public int getNum()
public java.net.InetSocketAddress getRemoteAddress(int id)
public java.net.InetSocketAddress getServerToServerRemoteAddress(int id)
public int getPort(int id)
public int getServerToServerPort(int id)
public int[] getHostsIds()
public void setPort(int id, int port)
public java.lang.String getHost(int id)
public java.net.InetSocketAddress getLocalAddress(int id)