private ServerInfo registerRelay(int id, String name, InetSocketAddress addr, String sources,
DatabusHttpClientImpl client)
throws InvalidConfigException
{
RuntimeConfigBuilder rtConfigBuilder =
(RuntimeConfigBuilder)client.getClientConfigManager().getConfigBuilder();
ServerInfoBuilder relayConfigBuilder = rtConfigBuilder.getRelay(Integer.toString(id));
relayConfigBuilder.setName(name);
relayConfigBuilder.setHost(addr.getHostName());
relayConfigBuilder.setPort(addr.getPort());
relayConfigBuilder.setSources(sources);
ServerInfo si = relayConfigBuilder.build();
client.getClientConfigManager().setNewConfig(rtConfigBuilder.build());
return si;
}