[GLASSFISH-17085] Provide way to write monitoring listener without modifying framework classes Created: 21/Jul/11  Updated: 10/Aug/11

Status: Open
Project: glassfish
Component/s: monitoring
Affects Version/s: 3.1
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Tom Mueller Assignee: Byron Nevins
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File XYZListener.java    
Issue Links:
blocks GLASSFISH-17182 Make monitoring framework completely ... Open


When writing an monitoring listener by extending the ProbeProviderEventListener class, it becomes necessary to modify the framework's ProbeClientInvokerFactory class to add a create*Invoker method that increments the AtomicInteger that is contained in that class.

This RFE is for modifying the flashlight framework so that it is possible to create a ProbeProviderEventListener and add it to the system without having to modify any of the framework classes.

Comment by Byron Nevins [ 21/Jul/11 ]

ProbeProviderEventListener is an interface not a class. You don't extend it you implement it.

Can you give more details?
What exactly do you want?

How about:
1) Sample Code for how you have to do it now.
2) Sample Code for how you would like to do it instead.

Comment by Tom Mueller [ 21/Jul/11 ]

Please see the attached file, XYZListener.java, for sample code that implements the ProbeProviderEventListener interface. In the probeProviderAdded method, there is a call to p.addInvoker(ProbeClientInvokerFactory.createXYZInvoker(p)

The code for the createXYZInvoker method is the following:

public static ProbeClientInvoker createXYZInvoker(FlashlightProbe probe)

{ int invokerId = clientMethodIdCounter.incrementAndGet(); return new XYZListener.XYZProbeClientInvoker(invokerId, probe); }

Maybe there is a way to get an invokerId without using the clientMethodIdCounter that is a private member of ProbeClientInvokderFactory, but I didn't see one.

Generated at Fri Oct 09 16:10:03 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.