Package javax.management.modelmbean

Examples of javax.management.modelmbean.ModelMBeanInfo


        new Integer(4));
    assertEquals("set operation should have role \"setter\"", "setter", set.getDescriptor().getFieldValue("role"));
  }

  public void testNotificationMetadata() throws Exception {
    ModelMBeanInfo info = (ModelMBeanInfo) getMBeanInfo();
    MBeanNotificationInfo[] notifications = info.getNotifications();
    assertEquals("Incorrect number of notifications", 1, notifications.length);
    assertEquals("Incorrect notification name", "My Notification", notifications[0].getName());

    String[] notifTypes = notifications[0].getNotifTypes();
View Full Code Here


    assertEquals("Notification type.bar not found", "type.bar", notifTypes[1]);
  }

  protected ModelMBeanInfo getMBeanInfoFromAssembler() throws Exception {
    IJmxTestBean bean = getBean();
    ModelMBeanInfo info = getAssembler().getMBeanInfo(bean, getObjectName());
    return info;
  }
View Full Code Here

public class MethodExclusionMBeanInfoAssemblerMappedTests extends AbstractJmxAssemblerTests {

  protected static final String OBJECT_NAME = "bean:name=testBean4";

  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());
  }
View Full Code Here

    assertTrue("Age is not readable", attr.isReadable());
    assertFalse("Age is not writable", attr.isWritable());
  }

  public void testNickNameIsExposed() throws Exception {
    ModelMBeanInfo inf = (ModelMBeanInfo) getMBeanInfo();
    MBeanAttributeInfo attr = inf.getAttribute("NickName");
    assertNotNull("Nick Name should not be null", attr);
    assertTrue("Nick Name should be writable", attr.isWritable());
    assertTrue("Nick Name should be readable", attr.isReadable());
  }
View Full Code Here

    assembler.setManagedMethods(new String[] {"add", "myOperation", "getName", "setName", "getAge"});
    return assembler;
  }

  public void testGetAgeIsReadOnly() throws Exception {
    ModelMBeanInfo info = getMBeanInfoFromAssembler();
    ModelMBeanAttributeInfo attr = info.getAttribute(AGE_ATTRIBUTE);

    assertTrue(attr.isReadable());
    assertFalse(attr.isWritable());
  }
View Full Code Here

    assembler.setManagedInterfaces(new Class[] {ICustomJmxBean.class});
    return assembler;
  }

  public void testGetAgeIsReadOnly() throws Exception {
    ModelMBeanInfo info = getMBeanInfoFromAssembler();
    ModelMBeanAttributeInfo attr = info.getAttribute(AGE_ATTRIBUTE);

    assertTrue(attr.isReadable());
    assertFalse(attr.isWritable());
  }
View Full Code Here

public class MethodExclusionMBeanInfoAssemblerNotMappedTests extends AbstractJmxAssemblerTests {

  protected static final String OBJECT_NAME = "bean:name=testBean4";

  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());
  }
View Full Code Here

public class MethodExclusionMBeanInfoAssemblerComboTests extends AbstractJmxAssemblerTests {

  protected static final String OBJECT_NAME = "bean:name=testBean4";

  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());
  }
View Full Code Here

    assertTrue("Age is not readable", attr.isReadable());
    assertFalse("Age is not writable", attr.isWritable());
  }

  public void testNickNameIsExposed() throws Exception {
    ModelMBeanInfo inf = (ModelMBeanInfo) getMBeanInfo();
    MBeanAttributeInfo attr = inf.getAttribute("NickName");
    assertNotNull("Nick Name should not be null", attr);
    assertTrue("Nick Name should be writable", attr.isWritable());
    assertTrue("Nick Name should be readable", attr.isReadable());
  }
View Full Code Here

* @author Rob Harrop
*/
public abstract class AbstractMetadataAssemblerTests extends AbstractJmxAssemblerTests {

  public void testDescription() throws Exception {
    ModelMBeanInfo info = getMBeanInfoFromAssembler();
    assertEquals("The descriptions are not the same", "My Managed Bean",
        info.getDescription());
  }
View Full Code Here

TOP

Related Classes of javax.management.modelmbean.ModelMBeanInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.