Package javax.management.modelmbean

Examples of javax.management.modelmbean.ModelMBeanAttributeInfo


    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


    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

  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

  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

        info.getDescription());
  }

  public void testAttributeDescriptionOnSetter() throws Exception {
    ModelMBeanInfo inf = getMBeanInfoFromAssembler();
    ModelMBeanAttributeInfo attr = inf.getAttribute(AGE_ATTRIBUTE);
    assertEquals("The description for the age attribute is incorrect",
        "The Age Attribute", attr.getDescription());
  }
View Full Code Here

        "The Age Attribute", attr.getDescription());
  }

  public void testAttributeDescriptionOnGetter() throws Exception {
    ModelMBeanInfo inf = getMBeanInfoFromAssembler();
    ModelMBeanAttributeInfo attr = inf.getAttribute(NAME_ATTRIBUTE);
    assertEquals("The description for the name attribute is incorrect",
        "The Name Attribute", attr.getDescription());
  }
View Full Code Here

  /**
   * Tests the situation where the attribute is only defined on the getter.
   */
  public void testReadOnlyAttribute() throws Exception {
    ModelMBeanInfo inf = getMBeanInfoFromAssembler();
    ModelMBeanAttributeInfo attr = inf.getAttribute(AGE_ATTRIBUTE);
    assertFalse("The age attribute should not be writable", attr.isWritable());
  }
View Full Code Here

    assertFalse("The age attribute should not be writable", attr.isWritable());
  }

  public void testReadWriteAttribute() throws Exception {
    ModelMBeanInfo inf = getMBeanInfoFromAssembler();
    ModelMBeanAttributeInfo attr = inf.getAttribute(NAME_ATTRIBUTE);
    assertTrue("The name attribute should be writable", attr.isWritable());
    assertTrue("The name attribute should be readable", attr.isReadable());
  }
View Full Code Here

  /**
   * Tests the situation where the property only has a getter.
   */
  public void testWithOnlySetter() throws Exception {
    ModelMBeanInfo inf = getMBeanInfoFromAssembler();
    ModelMBeanAttributeInfo attr = inf.getAttribute("NickName");
    assertNotNull("Attribute should not be null", attr);
  }
View Full Code Here

  /**
   * Tests the situation where the property only has a setter.
   */
  public void testWithOnlyGetter() throws Exception {
    ModelMBeanInfo info = getMBeanInfoFromAssembler();
    ModelMBeanAttributeInfo attr = info.getAttribute("Superman");
    assertNotNull("Attribute should not be null", attr);
  }
View Full Code Here

TOP

Related Classes of javax.management.modelmbean.ModelMBeanAttributeInfo

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.