Welcome! Please see the About page for a little more info on how this works.

0 votes
in java.jmx by

The attached patch extends java.jmx to support creating beans that expose invokable operations. Operation function definitions are supplied after the state-ref in the create-bean form in a syntax similar to protocol method implementations. Type signatures, descriptions, and impact constants are harvested from metadata on the operation definitions. Nontrivial argument type binders (rest arguments, destructuring, etc) in operations are not supported.

I am sure this patch could be improved in many ways; the operation method parser in create-bean feels unnecessarily hairy and yet limited at the same time, because my macro-fu is not yet strong. The documentation examples are not yet updated, though I am happy to do this if the feature is reviewed and accepted.

4 Answers

0 votes
by

Comment made by: hlewisship

I've done something similar internally, and would love to see some approach to exposing operations as an official part of the library.

0 votes
by

Comment made by: timmc

Our fork of java.jmx has matured a bit, so I'd be happy to submit an updated version of Chris's original patch if it's at all of interest. Let me know and I can work one up.

0 votes
by

Comment made by: nickmbailey

An updated patch would be absolutely welcome!

0 votes
by
Reference: https://clojure.atlassian.net/browse/JMX-8 (reported by bccjeris)
...