While writing my plugin I came across the problem that I would like to
inject my custom self written client with a suggest method, whenever
node.client() is called - this would be especially useful for my
tests, as I am currently doing integration tests against the rest
controller.
Sadly, there isn't really an option to do it. But, you could get the
TransportXXAction one and use it (from the internal injector). Need to
think more on custom APIs and how to add them to a statically typed
language
While writing my plugin I came across the problem that I would like to
inject my custom self written client with a suggest method, whenever
node.client() is called - this would be especially useful for my
tests, as I am currently doing integration tests against the rest
controller.
Sadly, there isn't really an option to do it. But, you could get the
TransportXXAction one and use it (from the internal injector). Need to
think more on custom APIs and how to add them to a statically typed
language
Hm, it feels a bit like maven downloading half the internet three
times when I try to resolve the dependencies of a
TransportBroadcastOperationAction manually, as it needs a
clusterservice, a transport service and a indicesservice - which in
turn needs all kinds of modules injected.
Does it make sense to resolve all these dependencies or is there some
trick I just dont see? Or some even better solution?
Sadly, there isn't really an option to do it. But, you could get the
TransportXXAction one and use it (from the internal injector). Need to
think more on custom APIs and how to add them to a statically typed
language
Hm, it feels a bit like maven downloading half the internet three
times when I try to resolve the dependencies of a
TransportBroadcastOperationAction manually, as it needs a
clusterservice, a transport service and a indicesservice - which in
turn needs all kinds of modules injected.
Does it make sense to resolve all these dependencies or is there some
trick I just dont see? Or some even better solution?
What? You have your action implemented, no? You can get the guice injector
and get its (singleton) instance.
Works now, I did the same as in the HdfsGatewayTests:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.