Search in sources :

Example 46 with ModelMBeanAttributeInfo

use of javax.management.modelmbean.ModelMBeanAttributeInfo in project spring-framework by spring-projects.

the class MethodNameBasedMBeanInfoAssemblerMappedTests method testGetAgeIsReadOnly.

@Test
public void testGetAgeIsReadOnly() throws Exception {
    ModelMBeanInfo info = getMBeanInfoFromAssembler();
    ModelMBeanAttributeInfo attr = info.getAttribute(AGE_ATTRIBUTE);
    assertTrue("Age is not readable", attr.isReadable());
    assertFalse("Age is not writable", attr.isWritable());
}
Also used : ModelMBeanAttributeInfo(javax.management.modelmbean.ModelMBeanAttributeInfo) ModelMBeanInfo(javax.management.modelmbean.ModelMBeanInfo) Test(org.junit.Test)

Example 47 with ModelMBeanAttributeInfo

use of javax.management.modelmbean.ModelMBeanAttributeInfo in project spring-framework by spring-projects.

the class MethodExclusionMBeanInfoAssemblerMappedTests method testGetAgeIsReadOnly.

@Test
public void testGetAgeIsReadOnly() throws Exception {
    ModelMBeanInfo info = getMBeanInfoFromAssembler();
    ModelMBeanAttributeInfo attr = info.getAttribute(AGE_ATTRIBUTE);
    assertTrue("Age is not readable", attr.isReadable());
    assertFalse("Age is not writable", attr.isWritable());
}
Also used : ModelMBeanAttributeInfo(javax.management.modelmbean.ModelMBeanAttributeInfo) ModelMBeanInfo(javax.management.modelmbean.ModelMBeanInfo) Test(org.junit.Test)

Example 48 with ModelMBeanAttributeInfo

use of javax.management.modelmbean.ModelMBeanAttributeInfo in project spring-framework by spring-projects.

the class MethodExclusionMBeanInfoAssemblerNotMappedTests method testGetAgeIsReadOnly.

@Test
public void testGetAgeIsReadOnly() throws Exception {
    ModelMBeanInfo info = getMBeanInfoFromAssembler();
    ModelMBeanAttributeInfo attr = info.getAttribute(AGE_ATTRIBUTE);
    assertTrue("Age is not readable", attr.isReadable());
    assertTrue("Age is not writable", attr.isWritable());
}
Also used : ModelMBeanAttributeInfo(javax.management.modelmbean.ModelMBeanAttributeInfo) ModelMBeanInfo(javax.management.modelmbean.ModelMBeanInfo) Test(org.junit.Test)

Example 49 with ModelMBeanAttributeInfo

use of javax.management.modelmbean.ModelMBeanAttributeInfo in project spring-framework by spring-projects.

the class MethodExclusionMBeanInfoAssemblerTests method testSupermanIsReadOnly.

@Test
public void testSupermanIsReadOnly() throws Exception {
    ModelMBeanInfo info = getMBeanInfoFromAssembler();
    ModelMBeanAttributeInfo attr = info.getAttribute("Superman");
    assertTrue(attr.isReadable());
    assertFalse(attr.isWritable());
}
Also used : ModelMBeanAttributeInfo(javax.management.modelmbean.ModelMBeanAttributeInfo) ModelMBeanInfo(javax.management.modelmbean.ModelMBeanInfo) Test(org.junit.Test)

Example 50 with ModelMBeanAttributeInfo

use of javax.management.modelmbean.ModelMBeanAttributeInfo 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());
}
Also used : ModelMBeanOperationInfo(javax.management.modelmbean.ModelMBeanOperationInfo) ModelMBeanAttributeInfo(javax.management.modelmbean.ModelMBeanAttributeInfo) ModelMBeanInfo(javax.management.modelmbean.ModelMBeanInfo) Test(org.junit.Test)

Aggregations

ModelMBeanAttributeInfo (javax.management.modelmbean.ModelMBeanAttributeInfo)56 ModelMBeanInfo (javax.management.modelmbean.ModelMBeanInfo)25 Test (org.junit.Test)18 Descriptor (javax.management.Descriptor)16 ModelMBeanOperationInfo (javax.management.modelmbean.ModelMBeanOperationInfo)10 ModelMBeanInfoSupport (javax.management.modelmbean.ModelMBeanInfoSupport)7 DescriptorSupport (javax.management.modelmbean.DescriptorSupport)6 Method (java.lang.reflect.Method)5 RuntimeOperationsException (javax.management.RuntimeOperationsException)4 FileLogger (mx4j.log.FileLogger)4 Logger (mx4j.log.Logger)4 MBeanLogger (mx4j.log.MBeanLogger)4 ArrayList (java.util.ArrayList)3 Attribute (javax.management.Attribute)3 MBeanAttributeInfo (javax.management.MBeanAttributeInfo)3 MBeanServer (javax.management.MBeanServer)3 ObjectName (javax.management.ObjectName)3 ModelMBean (javax.management.modelmbean.ModelMBean)3 ModelMBeanNotificationInfo (javax.management.modelmbean.ModelMBeanNotificationInfo)3 RequiredModelMBean (javax.management.modelmbean.RequiredModelMBean)3