Rename local plugin componenents list for clarity
This commit is contained in:
parent
99ac65931a
commit
05ea943def
|
@ -172,17 +172,17 @@ public class TransportClient extends AbstractClient {
|
||||||
final TransportProxyClient proxy = new TransportProxyClient(settings, transportService, nodesService,
|
final TransportProxyClient proxy = new TransportProxyClient(settings, transportService, nodesService,
|
||||||
actionModule.getActions().values().stream().map(x -> x.getAction()).collect(Collectors.toList()));
|
actionModule.getActions().values().stream().map(x -> x.getAction()).collect(Collectors.toList()));
|
||||||
|
|
||||||
List<LifecycleComponent> pluginLifecycles = pluginComponents.stream()
|
List<LifecycleComponent> pluginLifecycleComponents = pluginComponents.stream()
|
||||||
.filter(p -> p instanceof LifecycleComponent)
|
.filter(p -> p instanceof LifecycleComponent)
|
||||||
.map(p -> (LifecycleComponent)p).collect(Collectors.toList());
|
.map(p -> (LifecycleComponent)p).collect(Collectors.toList());
|
||||||
pluginLifecycles.addAll(pluginsService.getGuiceServiceClasses().stream()
|
pluginLifecycleComponents.addAll(pluginsService.getGuiceServiceClasses().stream()
|
||||||
.map(injector::getInstance).collect(Collectors.toList()));
|
.map(injector::getInstance).collect(Collectors.toList()));
|
||||||
resourcesToClose.addAll(pluginLifecycles);
|
resourcesToClose.addAll(pluginLifecycleComponents);
|
||||||
|
|
||||||
transportService.start();
|
transportService.start();
|
||||||
transportService.acceptIncomingRequests();
|
transportService.acceptIncomingRequests();
|
||||||
|
|
||||||
TransportClient transportClient = new TransportClient(injector, pluginLifecycles, nodesService, proxy);
|
TransportClient transportClient = new TransportClient(injector, pluginLifecycleComponents, nodesService, proxy);
|
||||||
resourcesToClose.clear();
|
resourcesToClose.clear();
|
||||||
return transportClient;
|
return transportClient;
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
@ -324,13 +324,13 @@ public class Node implements Closeable {
|
||||||
);
|
);
|
||||||
injector = modules.createInjector();
|
injector = modules.createInjector();
|
||||||
|
|
||||||
List<LifecycleComponent> pluginLifecycles = pluginComponents.stream()
|
List<LifecycleComponent> pluginLifecycleComponents = pluginComponents.stream()
|
||||||
.filter(p -> p instanceof LifecycleComponent)
|
.filter(p -> p instanceof LifecycleComponent)
|
||||||
.map(p -> (LifecycleComponent)p).collect(Collectors.toList());
|
.map(p -> (LifecycleComponent)p).collect(Collectors.toList());
|
||||||
pluginLifecycles.addAll(pluginsService.getGuiceServiceClasses().stream()
|
pluginLifecycleComponents.addAll(pluginsService.getGuiceServiceClasses().stream()
|
||||||
.map(injector::getInstance).collect(Collectors.toList()));
|
.map(injector::getInstance).collect(Collectors.toList()));
|
||||||
resourcesToClose.addAll(pluginLifecycles);
|
resourcesToClose.addAll(pluginLifecycleComponents);
|
||||||
pluginLifecycleComponents = Collections.unmodifiableList(pluginLifecycles);
|
this.pluginLifecycleComponents = Collections.unmodifiableList(pluginLifecycleComponents);
|
||||||
|
|
||||||
client.intialize(injector.getInstance(new Key<Map<GenericAction, TransportAction>>() {}));
|
client.intialize(injector.getInstance(new Key<Map<GenericAction, TransportAction>>() {}));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue