{
final boolean READABLE = true;
final boolean WRITABLE = true;
final boolean ISIS = true;
RequiredModelMBean mbean = new RequiredModelMBean();
ModelMBeanAttributeInfo attr1 = new ModelMBeanAttributeInfo(
"Kissa",
String.class.getName(),
"Some attribute description",
!READABLE, !WRITABLE, !ISIS
);
ModelMBeanAttributeInfo attr2 = new ModelMBeanAttributeInfo(
"Koira",
String.class.getName(),
"Another attribute description",
!READABLE, !WRITABLE, !ISIS
);
ModelMBeanConstructorInfo constr1 = new ModelMBeanConstructorInfo(
"FirstConstructor",
"Description of the first constructor",
null
);
ModelMBeanConstructorInfo constr2 = new ModelMBeanConstructorInfo(
"SecondConstructor",
"Description of the second constructor",
null
);
ModelMBeanConstructorInfo constr3 = new ModelMBeanConstructorInfo(
"ThirdConstructor",
"Description of the 3rd constructor",
null
);
ModelMBeanOperationInfo operation = new ModelMBeanOperationInfo(
"AnOperation",
"The description",
null,
"AType",
MBeanOperationInfo.ACTION
);
ModelMBeanInfoSupport info = new ModelMBeanInfoSupport(
mbean.getClass().getName(),
"some description",
new ModelMBeanAttributeInfo[] { attr1, attr2 },
new ModelMBeanConstructorInfo[] { constr1, constr2, constr3 },
new ModelMBeanOperationInfo[] { operation },
null