Add NamedWriteables from plugins to TransportClient
Plugins provide NamedWriteables that are added to the NamedWriteableRegistry. Those are added on Nodes already, the same mechanism is added to the setup for TransportClient.
This commit is contained in:
parent
841d5a210e
commit
c32a4324b0
|
@ -124,6 +124,9 @@ public abstract class TransportClient extends AbstractClient {
|
|||
List<NamedWriteableRegistry.Entry> entries = new ArrayList<>();
|
||||
entries.addAll(networkModule.getNamedWriteables());
|
||||
entries.addAll(searchModule.getNamedWriteables());
|
||||
entries.addAll(pluginsService.filterPlugins(Plugin.class).stream()
|
||||
.flatMap(p -> p.getNamedWriteables().stream())
|
||||
.collect(Collectors.toList()));
|
||||
NamedWriteableRegistry namedWriteableRegistry = new NamedWriteableRegistry(entries);
|
||||
|
||||
ModulesBuilder modules = new ModulesBuilder();
|
||||
|
|
Loading…
Reference in New Issue