6265ef1c1b
There are presently 7 ctor args used in any rest handlers: * `Settings`: Every handler uses it to initialize a logger and some other strange things. * `RestController`: Every handler registers itself with it. * `ClusterSettings`: Used by `RestClusterGetSettingsAction` to render the default values for cluster settings. * `IndexScopedSettings`: Used by `RestGetSettingsAction` to get the default values for index settings. * `SettingsFilter`: Used by a few handlers to filter returned settings so we don't expose stuff like passwords. * `IndexNameExpressionResolver`: Used by `_cat/indices` to filter the list of indices. * `Supplier<DiscoveryNodes>`: Used to fill enrich the response by handlers that list tasks. We probably want to reduce these arguments over time but switching construction away from guice gives us tighter control over the list of available arguments. These parameters are passed to plugins using `ActionPlugin#initRestHandlers` which is expected to build and return that handlers immediately. This felt simpler than returning an reference to the ctors given all the different possible args. Breaks java plugins by moving rest handlers off of guice. |
||
---|---|---|
.. | ||
src | ||
build.gradle |