Java Filter plugin development have hooks like register

Hi,

I am new to logstash and being a java developer i wanted to write plugins in java so went ahead and explored the sample filter plugin in java. Our usecase is to enrich the events with the data which could be fetched through ReST calls.
We wanted to develop a plugin in java where we prefetch the data when the plugin is loaded which will be only once when the logstash is loaded. This is similar to JDBC static filter initial loading of data from db . But in our case its will be from a ReST call.
On events use the cache that is built at startup.

To have above approach if i am writing my custom java plugin do i have a call back hooks on when the logstash is loaded for first time so that i can make the initial ReST call and build the cache. Basically looking at something like register phase in the ruby plugin.

Is there any sample code which does some operation at startup.

Any pointers on how to acheive it will be appreciated.

Thank You

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.