Posted: 11 Nov 2016 11:34 EST Last activity: 28 Nov 2016 5:30 EST
Accessing File Listener through Java
There is a requirement to check the status of a File Listener from Activity and take action based on the status. I tried to search for an Engine API (e.g. AgentUtils is there for checking Agent status) which can provide series of standard methods to get access to File Listeners, but did not find any. The file listener status is available in SMA, but how to get and process that status from existing Application Code (Like Activity/JAVA Step)?
I believe there is no OOTB way to do this but anything custom approach like getting list of thread names running on that node Eg:tools.getThread().getRequestor().getThreadNames(); and putting a filter for the thread on which listener is running, can be made available. However there will still be question as whether your listener runs on all nodes/Host based startup/Node based startup?