User: squirest
  Date: 02/01/18 09:28:43

  Added:       src/main/test/compliance/standard/support
                        ArbitraryInterface.java DynamicDerived1.java
                        StandardDerived1.java StandardDerived2.java
                        StandardDerived2MBean.java StandardDerived3.java
                        StandardDerived3MBean.java StandardParent.java
                        StandardParentMBean.java
  Log:
  added testcases for mbean inheritance
  added testcases for some types of NotCompliant MBeans
  
  Revision  Changes    Path
  1.1                  
jmx/src/main/test/compliance/standard/support/ArbitraryInterface.java
  
  Index: ArbitraryInterface.java
  ===================================================================
  /*
   * JBoss, the OpenSource J2EE webOS
   *
   * Distributable under LGPL license.
   * See terms of license at gnu.org.
   */
  
  package test.compliance.standard.support;
  
  public interface ArbitraryInterface
  {
     void setArbitraryValue(String value);
  }
  
  
  
  1.1                  
jmx/src/main/test/compliance/standard/support/DynamicDerived1.java
  
  Index: DynamicDerived1.java
  ===================================================================
  /*
   * JBoss, the OpenSource J2EE webOS
   *
   * Distributable under LGPL license.
   * See terms of license at gnu.org.
   */
  
  package test.compliance.standard.support;
  
  import javax.management.DynamicMBean;
  import javax.management.AttributeNotFoundException;
  import javax.management.MBeanException;
  import javax.management.ReflectionException;
  import javax.management.Attribute;
  import javax.management.InvalidAttributeValueException;
  import javax.management.AttributeList;
  import javax.management.MBeanInfo;
  import javax.management.MBeanAttributeInfo;
  import javax.management.MBeanConstructorInfo;
  import javax.management.MBeanOperationInfo;
  import javax.management.MBeanNotificationInfo;
  
  /**
   * implementing DynamicMBean means that we don't inherit the mbean info from
   * StandardParentMBean
   */
  public class DynamicDerived1 extends StandardParent implements DynamicMBean
  {
     public Object getAttribute(String attribute)
        throws AttributeNotFoundException, MBeanException, ReflectionException
     {
        return null;
     }
  
     public void setAttribute(Attribute attribute)
        throws AttributeNotFoundException, InvalidAttributeValueException,
        MBeanException, ReflectionException
     {
     }
  
     public AttributeList getAttributes(String[] attributes)
     {
        return new AttributeList();
     }
  
     public AttributeList setAttributes(AttributeList attributes)
     {
        return new AttributeList();
     }
  
     public Object invoke(String actionName,
                          Object[] params,
                          String[] signature)
        throws MBeanException, ReflectionException
     {
        return null;
     }
  
     public MBeanInfo getMBeanInfo()
     {
        return new MBeanInfo(this.getClass().getName(), "tester", new 
MBeanAttributeInfo[0],
                             new MBeanConstructorInfo[0], new MBeanOperationInfo[0], 
new MBeanNotificationInfo[0]);
     }
  }
  
  
  
  1.1                  
jmx/src/main/test/compliance/standard/support/StandardDerived1.java
  
  Index: StandardDerived1.java
  ===================================================================
  /*
   * JBoss, the OpenSource J2EE webOS
   *
   * Distributable under LGPL license.
   * See terms of license at gnu.org.
   */
  
  package test.compliance.standard.support;
  
  public class StandardDerived1 extends StandardParent
  {
     /**
      * we have no MBean interface so we inherit from our superclass MBean interface
      */
     public StandardDerived1()
     {
     }
  }
  
  
  
  1.1                  
jmx/src/main/test/compliance/standard/support/StandardDerived2.java
  
  Index: StandardDerived2.java
  ===================================================================
  /*
   * JBoss, the OpenSource J2EE webOS
   *
   * Distributable under LGPL license.
   * See terms of license at gnu.org.
   */
  
  package test.compliance.standard.support;
  
  public class StandardDerived2 extends StandardParent implements StandardDerived2MBean
  {
     /**
      * our own MBean interface overrides the StandardParentMBean one we inherited.
      */
  
     public void setDerivedValue(String derived)
     {
     }
  
     public String getParentValue()
     {
        return null;
     }
  }
  
  
  
  1.1                  
jmx/src/main/test/compliance/standard/support/StandardDerived2MBean.java
  
  Index: StandardDerived2MBean.java
  ===================================================================
  /*
   * JBoss, the OpenSource J2EE webOS
   *
   * Distributable under LGPL license.
   * See terms of license at gnu.org.
   */
  
  package test.compliance.standard.support;
  
  public interface StandardDerived2MBean
  {
     void setDerivedValue(String derived);
     String getParentValue();
  }
  
  
  
  1.1                  
jmx/src/main/test/compliance/standard/support/StandardDerived3.java
  
  Index: StandardDerived3.java
  ===================================================================
  /*
   * JBoss, the OpenSource J2EE webOS
   *
   * Distributable under LGPL license.
   * See terms of license at gnu.org.
   */
  
  package test.compliance.standard.support;
  
  public class StandardDerived3 implements StandardDerived3MBean
  {
     public void setArbitraryValue(String value)
     {
     }
  }
  
  
  
  1.1                  
jmx/src/main/test/compliance/standard/support/StandardDerived3MBean.java
  
  Index: StandardDerived3MBean.java
  ===================================================================
  /*
   * JBoss, the OpenSource J2EE webOS
   *
   * Distributable under LGPL license.
   * See terms of license at gnu.org.
   */
  
  package test.compliance.standard.support;
  
  public interface StandardDerived3MBean extends ArbitraryInterface
  {
  }
  
  
  
  1.1                  
jmx/src/main/test/compliance/standard/support/StandardParent.java
  
  Index: StandardParent.java
  ===================================================================
  /*
   * JBoss, the OpenSource J2EE webOS
   *
   * Distributable under LGPL license.
   * See terms of license at gnu.org.
   */
  
  package test.compliance.standard.support;
  
  public abstract class StandardParent implements StandardParentMBean
  {
     public void setParentValue(String value)
     {
     }
  
     public void setAvailable(boolean available)
     {
     }
  }
  
  
  
  1.1                  
jmx/src/main/test/compliance/standard/support/StandardParentMBean.java
  
  Index: StandardParentMBean.java
  ===================================================================
  /*
   * JBoss, the OpenSource J2EE webOS
   *
   * Distributable under LGPL license.
   * See terms of license at gnu.org.
   */
  
  package test.compliance.standard.support;
  
  public interface StandardParentMBean
  {
     void setParentValue(String value);
     void setAvailable(boolean available);
  }
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to