Search in sources :

Example 1 with ConfigCenterManager

use of org.apache.servicecomb.config.center.client.ConfigCenterManager in project incubator-servicecomb-java-chassis by apache.

the class ConfigCenterConfigurationSourceImpl method init.

@Override
public void init(Configuration localConfiguration) {
    configConverter = new ConfigConverter(ConfigCenterConfig.INSTANCE.getFileSources());
    AddressManager kieAddressManager = configKieAddressManager();
    HttpTransport httpTransport = createHttpTransport(kieAddressManager, HttpTransportFactory.defaultRequestConfig().build(), localConfiguration);
    ConfigCenterClient configCenterClient = new ConfigCenterClient(kieAddressManager, httpTransport);
    EventManager.register(this);
    QueryConfigurationsRequest queryConfigurationsRequest = firstPull(configCenterClient);
    configCenterManager = new ConfigCenterManager(configCenterClient, EventManager.getEventBus(), configConverter);
    configCenterManager.setQueryConfigurationsRequest(queryConfigurationsRequest);
    configCenterManager.startConfigCenterManager();
}
Also used : ConfigConverter(org.apache.servicecomb.config.common.ConfigConverter) HttpTransport(org.apache.servicecomb.http.client.common.HttpTransport) AddressManager(org.apache.servicecomb.config.center.client.AddressManager) ConfigCenterManager(org.apache.servicecomb.config.center.client.ConfigCenterManager) QueryConfigurationsRequest(org.apache.servicecomb.config.center.client.model.QueryConfigurationsRequest) ConfigCenterClient(org.apache.servicecomb.config.center.client.ConfigCenterClient)

Example 2 with ConfigCenterManager

use of org.apache.servicecomb.config.center.client.ConfigCenterManager in project java-chassis by ServiceComb.

the class ConfigCenterConfigurationSourceImpl method init.

@Override
public void init(Configuration localConfiguration) {
    configConverter = new ConfigConverter(ConfigCenterConfig.INSTANCE.getFileSources());
    AddressManager kieAddressManager = configKieAddressManager();
    HttpTransport httpTransport = createHttpTransport(kieAddressManager, HttpTransportFactory.defaultRequestConfig().build(), localConfiguration);
    ConfigCenterClient configCenterClient = new ConfigCenterClient(kieAddressManager, httpTransport);
    EventManager.register(this);
    QueryConfigurationsRequest queryConfigurationsRequest = firstPull(configCenterClient);
    configCenterManager = new ConfigCenterManager(configCenterClient, EventManager.getEventBus(), configConverter);
    configCenterManager.setQueryConfigurationsRequest(queryConfigurationsRequest);
    configCenterManager.startConfigCenterManager();
}
Also used : ConfigConverter(org.apache.servicecomb.config.common.ConfigConverter) HttpTransport(org.apache.servicecomb.http.client.common.HttpTransport) AddressManager(org.apache.servicecomb.config.center.client.AddressManager) ConfigCenterManager(org.apache.servicecomb.config.center.client.ConfigCenterManager) QueryConfigurationsRequest(org.apache.servicecomb.config.center.client.model.QueryConfigurationsRequest) ConfigCenterClient(org.apache.servicecomb.config.center.client.ConfigCenterClient)

Aggregations

AddressManager (org.apache.servicecomb.config.center.client.AddressManager)2 ConfigCenterClient (org.apache.servicecomb.config.center.client.ConfigCenterClient)2 ConfigCenterManager (org.apache.servicecomb.config.center.client.ConfigCenterManager)2 QueryConfigurationsRequest (org.apache.servicecomb.config.center.client.model.QueryConfigurationsRequest)2 ConfigConverter (org.apache.servicecomb.config.common.ConfigConverter)2 HttpTransport (org.apache.servicecomb.http.client.common.HttpTransport)2