JMX:如何通过纯Java为操作/属性添加描述

huangapple 未分类评论83阅读模式
英文:

JMX: how add description for Operations/Attributes through plain Java

问题

对于与 JMX 一起工作的 Java 应用程序,我可以注册自定义 MBean,它们可以通过 JConsole 或 VisualVM 来使用。

通过 Spring,通过框架本身提供的一组注释,可以为要在 JConsole 中显示的“操作”和“属性”添加描述。

在纯 Java 中如何实现相同的目标?(这里不涉及 Spring)。我已经在 StackOverflow 上进行了研究,并找到了一些第三方解决方案,例如:

但似乎没有直接的 Java 方法。

是否可能?如何实现?

英文:

For a Java App working with JMX I am able to register my custom MBeans, they are available to be used through either JConsole or VisualVM.

Through Spring, with a set of annotations available through the Framework itself, is possible add descriptions for the Operations and Attributes to be shown through JConsole.

How accomplish the same goal through plain Java? (Spring is not involved) here. I already did do a research in StackOverflow and I found some third party solutions, such as:

but seems there is no a direct approach by Java itself.

Is it possible? How?

huangapple
  • 本文由 发表于 2020年7月26日 08:09:12
  • 转载请务必保留本文链接:https://java.coder-hub.com/63094823.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定