@Retention(value=RUNTIME) @Target(value=TYPE) @Inherited public @interface MBean
Use this annotation to manage an object as an MBean.
You can use EL expressions to dynamically resolve the name and description of the MBean.
E.g. #{name} will be replaced by the value of the field name if it exists or the value returned by method getName().
Also complex expressions like #{pmv.application.name}
works.
Example:
@MBean
(value="ivy:type=MyBean,name=#{name}", description="#{descr}")
public class MyBean
{
private String name="Hello";
private String getDescr()
{
return "Description of "+name;
}
}
The bean will be register with the name ivy:type=MyBean,name=Hello
and a description Description of Hello
.MBeans.registerMBeanFor(Object)
or @{link MCollections}.
Use MAttribute
and MOperation
to add managed attributes and operations to a MBean.Modifier and Type | Required Element and Description |
---|---|
String |
value |
Modifier and Type | Optional Element and Description |
---|---|
String |
description |
boolean |
makeNameUnique
If set to true then the bean will be registered even if another bean with the same name is already registered.
|
public abstract String value
public abstract String description
public abstract boolean makeNameUnique
Copyright © 2016 AXON IVY AG. All rights reserved.