I'm also trying to write a custom plugin , which can also be called straight from java with a transport client. My plugin only needs to use existing features like search, analyze ( I'm building it in order to go less to es and do everything on the server side ).
In the BaseRestHandler class I can easily access the client. But when I'm trying to build the hierarchy for the java execution ( action, request, response, builder ) I don't have access to a client which exposes to me all these actions.
It's not clear to me which base classes should I extend in order to be able to use it. Also, I don't need to do something specific for each shard, I would like the client to handle everything.
Is it possible to do this ? Can you please point me in the right direction because I've been struggling with this for days now.