eclipse-openj9 / openj9-utils

Other
16 stars 29 forks source link

Implement app callback feature #23

Closed mpirvu closed 3 years ago

mpirvu commented 3 years ago

This commit gives the application the ability to register a callback function with the agent, such that when an event is triggered and data collected, that data is sent to the application through the callback. To accomodate this change the structure of a command changed to allow the "callback" keyword, which will define the class, method name and signature of the callback. Example: { "functionality": "monitorEvents", "command": "start", "callback": { "class": "T", "method": "callback", "signature": "(Ljava/lang/String;)V" } } The commit also implements some code restructuring to introduce a class EventConfig which will be used to store (and cache) information about each type of event that is monitored.

Signed-off-by: Marius Pirvu mpirvu@ca.ibm.com

mpirvu commented 3 years ago

@dsouzai Could you please review/merge this PR? Thanks

mpirvu commented 3 years ago

Addressed review comments. Ready for another review.