use of javax.management.modelmbean.ModelMBeanAttributeInfo in project orientdb by orientechnologies.
the class OPerformanceStatisticManagerMBean method populateWALSize.
private void populateWALSize(List<MBeanAttributeInfo> performanceAttributes) {
final MBeanAttributeInfo walSize = new ModelMBeanAttributeInfo(WAL_SIZE, long.class.getName(), "WAL size in bytes", true, false, false);
performanceAttributes.add(walSize);
}
use of javax.management.modelmbean.ModelMBeanAttributeInfo in project orientdb by orientechnologies.
the class OPerformanceStatisticManagerMBean method populateWALLogTime.
private void populateWALLogTime(List<MBeanAttributeInfo> performanceAttributes) {
final MBeanAttributeInfo walLogTime = new ModelMBeanAttributeInfo(WAL_LOG_TIME, long.class.getName(), "Time which is spent to log single record in WAL", true, false, false);
performanceAttributes.add(walLogTime);
}
use of javax.management.modelmbean.ModelMBeanAttributeInfo in project spring-framework by spring-projects.
the class AnnotationMetadataAssemblerTests method testRegistrationOnInterface.
@Test
public void testRegistrationOnInterface() throws Exception {
Object bean = getContext().getBean("testInterfaceBean");
ModelMBeanInfo inf = getAssembler().getMBeanInfo(bean, "bean:name=interfaceTestBean");
assertNotNull(inf);
assertEquals("My Managed Bean", inf.getDescription());
ModelMBeanOperationInfo op = inf.getOperation("foo");
assertNotNull("foo operation not exposed", op);
assertEquals("invoke foo", op.getDescription());
assertNull("doNotExpose operation should not be exposed", inf.getOperation("doNotExpose"));
ModelMBeanAttributeInfo attr = inf.getAttribute("Bar");
assertNotNull("bar attribute not exposed", attr);
assertEquals("Bar description", attr.getDescription());
ModelMBeanAttributeInfo attr2 = inf.getAttribute("CacheEntries");
assertNotNull("cacheEntries attribute not exposed", attr2);
assertEquals("Metric Type should be COUNTER", "COUNTER", attr2.getDescriptor().getFieldValue("metricType"));
}
use of javax.management.modelmbean.ModelMBeanAttributeInfo in project spring-framework by spring-projects.
the class AnnotationMetadataAssemblerTests method testAttributeFromInterface.
@Test
public void testAttributeFromInterface() throws Exception {
ModelMBeanInfo inf = getMBeanInfoFromAssembler();
ModelMBeanAttributeInfo attr = inf.getAttribute("Colour");
assertTrue("The name attribute should be writable", attr.isWritable());
assertTrue("The name attribute should be readable", attr.isReadable());
}
use of javax.management.modelmbean.ModelMBeanAttributeInfo in project spring-framework by spring-projects.
the class MethodNameBasedMBeanInfoAssemblerTests method testGetAgeIsReadOnly.
@Test
public void testGetAgeIsReadOnly() throws Exception {
ModelMBeanInfo info = getMBeanInfoFromAssembler();
ModelMBeanAttributeInfo attr = info.getAttribute(AGE_ATTRIBUTE);
assertTrue(attr.isReadable());
assertFalse(attr.isWritable());
}
Aggregations