Search in sources :

Example 6 with ModelMBeanInfo

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

the class AnnotationMetadataAssemblerTests method testOperationFromInterface.

@Test
public void testOperationFromInterface() throws Exception {
    ModelMBeanInfo inf = getMBeanInfoFromAssembler();
    ModelMBeanOperationInfo op = inf.getOperation("fromInterface");
    assertNotNull(op);
}
Also used : ModelMBeanOperationInfo(javax.management.modelmbean.ModelMBeanOperationInfo) ModelMBeanInfo(javax.management.modelmbean.ModelMBeanInfo) Test(org.junit.Test)

Example 7 with ModelMBeanInfo

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

Example 8 with ModelMBeanInfo

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

the class AbstractJmxAssemblerTests method testDescriptionNotNull.

@Test
public void testDescriptionNotNull() throws Exception {
    ModelMBeanInfo info = getMBeanInfoFromAssembler();
    assertNotNull("The MBean description should not be null", info.getDescription());
}
Also used : ModelMBeanInfo(javax.management.modelmbean.ModelMBeanInfo) Test(org.junit.Test)

Example 9 with ModelMBeanInfo

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

the class AbstractJmxAssemblerTests method testGetMBeanInfo.

@Test
public void testGetMBeanInfo() throws Exception {
    ModelMBeanInfo info = getMBeanInfoFromAssembler();
    assertNotNull("MBeanInfo should not be null", info);
}
Also used : ModelMBeanInfo(javax.management.modelmbean.ModelMBeanInfo) Test(org.junit.Test)

Example 10 with ModelMBeanInfo

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

Aggregations

ModelMBeanInfo (javax.management.modelmbean.ModelMBeanInfo)63 Test (org.junit.Test)44 ModelMBeanAttributeInfo (javax.management.modelmbean.ModelMBeanAttributeInfo)33 Descriptor (javax.management.Descriptor)16 ModelMBeanOperationInfo (javax.management.modelmbean.ModelMBeanOperationInfo)12 MBeanAttributeInfo (javax.management.MBeanAttributeInfo)9 ModelMBeanInfoSupport (javax.management.modelmbean.ModelMBeanInfoSupport)9 RequiredModelMBean (javax.management.modelmbean.RequiredModelMBean)8 InvalidTargetObjectTypeException (javax.management.modelmbean.InvalidTargetObjectTypeException)6 MBeanException (javax.management.MBeanException)5 ObjectName (javax.management.ObjectName)5 FileLogger (mx4j.log.FileLogger)5 Logger (mx4j.log.Logger)5 MBeanLogger (mx4j.log.MBeanLogger)5 InstanceNotFoundException (javax.management.InstanceNotFoundException)4 MBeanServer (javax.management.MBeanServer)4 RuntimeOperationsException (javax.management.RuntimeOperationsException)4 DescriptorSupport (javax.management.modelmbean.DescriptorSupport)4 ModelMBean (javax.management.modelmbean.ModelMBean)4 Attribute (javax.management.Attribute)3