JMX
netbeans at post.cz
netbeans at post.cz
Tue Feb 19 09:31:11 UTC 2019
Dear Dev.
1) MXBeans
I would like to recommend you simplify MXBeans as currently it is not so
easy to use.
E.g. If you need Map<String, Serializable> where even Serializable can be
simple open
types, so like dynamical for dirent key.
As Map is internal type is hard to modify to properly be each such call
converted to open type so I suggest to be possibly extend:
- @MXBean by adapter that to that will be hand over calls to convert
- or even as part of JMX.newMXBeanProxy
- option to ignore such calls (as alternative to unsupported opertion in
runtime) or even option on runtime auto conversion if returned value or
parameter is possible on runtime recognized as simple open type.
I think that there should be support for that.
Additionally there is Date, but why it is not there new java.time objects.
Or maybe MXBeans should be deprecated at all.
2) Maps vs MBean
As you my know there is use e.g. what ever type parameter you choose there
is get(Object) and similar to other methods.
So if you would like to use it as MBean Proxy you need to create new
interface extending e.g. Map<String, String> (even target does it) and you
have to explicitly create get(String).
If you do not do it.
More information about the jdk-dev
mailing list