use of javax.management.modelmbean.ModelMBeanOperationInfo in project spring-framework by spring-projects.
the class AbstractMetadataAssemblerTests method testMetricDescription.
@Test
public void testMetricDescription() throws Exception {
ModelMBeanInfo inf = getMBeanInfoFromAssembler();
ModelMBeanAttributeInfo metric = inf.getAttribute(QUEUE_SIZE_METRIC);
ModelMBeanOperationInfo operation = inf.getOperation("getQueueSize");
assertEquals("The description for the queue size metric is incorrect", "The QueueSize metric", metric.getDescription());
assertEquals("The description for the getter operation of the queue size metric is incorrect", "The QueueSize metric", operation.getDescription());
}
use of javax.management.modelmbean.ModelMBeanOperationInfo in project spring-framework by spring-projects.
the class AbstractMetadataAssemblerTests method testOperationParameterMetadata.
@Test
public void testOperationParameterMetadata() throws Exception {
ModelMBeanInfo info = getMBeanInfoFromAssembler();
ModelMBeanOperationInfo oper = info.getOperation("add");
MBeanParameterInfo[] params = oper.getSignature();
assertEquals("Invalid number of params", 2, params.length);
assertEquals("Incorrect name for x param", "x", params[0].getName());
assertEquals("Incorrect type for x param", int.class.getName(), params[0].getType());
assertEquals("Incorrect name for y param", "y", params[1].getName());
assertEquals("Incorrect type for y param", int.class.getName(), params[1].getType());
}
use of javax.management.modelmbean.ModelMBeanOperationInfo in project Activiti by Activiti.
the class MBeanInfoAssembler method extractMbeanOperations.
private void extractMbeanOperations(Object managedBean, Set<ManagedOperationInfo> operations, Set<ModelMBeanOperationInfo> mBeanOperations) {
for (ManagedOperationInfo info : operations) {
ModelMBeanOperationInfo mbean = new ModelMBeanOperationInfo(info.getDescription(), info.getOperation());
Descriptor opDesc = mbean.getDescriptor();
mbean.setDescriptor(opDesc);
mBeanOperations.add(mbean);
LOG.trace("Assembled operation: {}", mbean);
}
}
Aggregations