// build 'getpojoAttribute' operation
Descriptor descr21 = new DescriptorSupport();
descr21.setField("name", "getpojoAttribute");
descr21.setField("descriptorType", "operation");
ModelMBeanOperationInfo getpojoAttributeOperation =
new ModelMBeanOperationInfo(
"getpojoAttribute", // name
"A simple operation.", // description
null, // signature
int.class.getName(), // return type
MBeanOperationInfo.INFO, // impact
descr21 // descriptor
);
// build 'setpojoAttribute' operation
Descriptor descr22 = new DescriptorSupport();
descr22.setField("name", "setpojoAttribute");
descr22.setField("descriptorType", "operation");
ModelMBeanOperationInfo setpojoAttributeOperation =
new ModelMBeanOperationInfo(
"setpojoAttribute", // name
"A simple operation.", // description
new MBeanParameterInfo[] // signature
{ new MBeanParameterInfo("int", int.class.getName(), "int setter") },
void.class.getName(), // return type
MBeanOperationInfo.ACTION, // impact
descr22 // descriptor
);
// build 'pojoOperation' operation
Descriptor descr3 = new DescriptorSupport();
descr3.setField("name", "pojoOperation");
descr3.setField("descriptorType", "operation");
ModelMBeanOperationInfo pojoOperationInfo =
new ModelMBeanOperationInfo(
"pojoOperation", // name & description
"A simple operation.",
null, // signature
boolean.class.getName(), // return type
MBeanOperationInfo.ACTION, // impact