Search in sources :

Example 1 with RuntimeConfigBuilder

use of com.linkedin.databus.client.DatabusHttpClientImpl.RuntimeConfigBuilder in project databus by linkedin.

the class DummySuccessfulErrorCountingConsumer method registerRelay.

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;
}
Also used : ServerInfo(com.linkedin.databus.client.pub.ServerInfo) RuntimeConfigBuilder(com.linkedin.databus.client.DatabusHttpClientImpl.RuntimeConfigBuilder) ServerInfoBuilder(com.linkedin.databus.client.pub.ServerInfo.ServerInfoBuilder)

Example 2 with RuntimeConfigBuilder

use of com.linkedin.databus.client.DatabusHttpClientImpl.RuntimeConfigBuilder in project databus by linkedin.

the class TestDatabusV2ClusterRegistrationImpl method registerRelay.

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;
}
Also used : ServerInfo(com.linkedin.databus.client.pub.ServerInfo) RuntimeConfigBuilder(com.linkedin.databus.client.DatabusHttpClientImpl.RuntimeConfigBuilder) ServerInfoBuilder(com.linkedin.databus.client.pub.ServerInfo.ServerInfoBuilder)

Example 3 with RuntimeConfigBuilder

use of com.linkedin.databus.client.DatabusHttpClientImpl.RuntimeConfigBuilder in project databus by linkedin.

the class TestDatabusV2RegistrationImpl method registerRelay.

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;
}
Also used : ServerInfo(com.linkedin.databus.client.pub.ServerInfo) RuntimeConfigBuilder(com.linkedin.databus.client.DatabusHttpClientImpl.RuntimeConfigBuilder) ServerInfoBuilder(com.linkedin.databus.client.pub.ServerInfo.ServerInfoBuilder)

Aggregations

RuntimeConfigBuilder (com.linkedin.databus.client.DatabusHttpClientImpl.RuntimeConfigBuilder)3 ServerInfo (com.linkedin.databus.client.pub.ServerInfo)3 ServerInfoBuilder (com.linkedin.databus.client.pub.ServerInfo.ServerInfoBuilder)3