-
Notifications
You must be signed in to change notification settings - Fork 239
Description
Hi
Jolokia version used: 1.2.3
I coud not find in the reference manual or java doc whether the java client supports optional reads. And by that I mean, a ReadRequest where the mbean may not exists. And if the mbean does not exists I just want a response back with an indicator that the mbean didnt exists.
Today I had to add a try .. catch hack, or I would need to do a list call first to see if the mbean is there, and then etc. But I would love if there was a read optional. Then I can use that as well in a List call so I can do a bulk operation.
For an example see the source code of Apache Camel where we have a jolokia command module
I have these 3 mbeans I need to get information from
https://github.com/apache/camel/blob/master/platforms/commands/commands-jolokia/src/main/java/org/apache/camel/commands/jolokia/DefaultJolokiaCamelController.java#L117
And then this 4th mbean is optional, so I need to do a separate call to handle if it does not exists
https://github.com/apache/camel/blob/master/platforms/commands/commands-jolokia/src/main/java/org/apache/camel/commands/jolokia/DefaultJolokiaCamelController.java#L148