use of javax.management.modelmbean.ModelMBeanInfo in project spring-framework by spring-projects.
the class AnnotationMetadataAssemblerTests method testOperationOnGetter.
@Test
public void testOperationOnGetter() throws Exception {
ModelMBeanInfo inf = getMBeanInfoFromAssembler();
ModelMBeanOperationInfo op = inf.getOperation("getExpensiveToCalculate");
assertNotNull(op);
}
use of javax.management.modelmbean.ModelMBeanInfo in project spring-framework by spring-projects.
the class MethodNameBasedMBeanInfoAssemblerMappedTests method testNickNameIsExposed.
@Test
public void testNickNameIsExposed() throws Exception {
ModelMBeanInfo inf = (ModelMBeanInfo) getMBeanInfo();
MBeanAttributeInfo attr = inf.getAttribute("NickName");
assertNickName(attr);
}
use of javax.management.modelmbean.ModelMBeanInfo in project spring-framework by spring-projects.
the class MethodNameBasedMBeanInfoAssemblerMappedTests method testWithFallThrough.
@Test
public void testWithFallThrough() throws Exception {
MethodNameBasedMBeanInfoAssembler assembler = getWithMapping("foobar", "add,myOperation,getName,setName,getAge");
assembler.setManagedMethods("getNickName", "setNickName");
ModelMBeanInfo inf = assembler.getMBeanInfo(getBean(), getObjectName());
MBeanAttributeInfo attr = inf.getAttribute("NickName");
assertNickName(attr);
}
use of javax.management.modelmbean.ModelMBeanInfo 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());
}
use of javax.management.modelmbean.ModelMBeanInfo in project spring-framework by spring-projects.
the class MethodNameBasedMBeanInfoAssemblerTests method testSetNameParameterIsNamed.
@Test
public void testSetNameParameterIsNamed() throws Exception {
ModelMBeanInfo info = getMBeanInfoFromAssembler();
MBeanOperationInfo operationSetAge = info.getOperation("setName");
assertEquals("name", operationSetAge.getSignature()[0].getName());
}
Aggregations