Search in sources :

Example 6 with Derived

use of com.acme.Derived in project jetty.project by eclipse.

the class ObjectMBeanUtilTest method getArrayTypeAttribute.

private Derived[] getArrayTypeAttribute() {
    derivedManaged = new DerivedManaged();
    mBeanDerivedManaged = new ObjectMBean(derivedManaged);
    MBeanContainer mBeanDerivedManagedContainer = new MBeanContainer(ManagementFactory.getPlatformMBeanServer());
    mBeanDerivedManaged.setMBeanContainer(mBeanDerivedManagedContainer);
    Derived derived0 = new Derived();
    mBeanDerivedManagedContainer.beanAdded(null, derived0);
    Derived[] derivedes = new Derived[3];
    for (int i = 0; i < 3; i++) {
        derivedes[i] = new Derived();
    }
    derivedManaged.setAddresses(derivedes);
    mBeanDerivedManaged.getMBeanInfo();
    ArrayList<Derived> aliasNames = new ArrayList<Derived>(Arrays.asList(derivedes));
    derivedManaged.setAliasNames(aliasNames);
    return derivedes;
}
Also used : Derived(com.acme.Derived) DerivedManaged(com.acme.DerivedManaged) ArrayList(java.util.ArrayList)

Aggregations

Derived (com.acme.Derived)6 Test (org.junit.Test)5 MBeanInfo (javax.management.MBeanInfo)2 DerivedManaged (com.acme.DerivedManaged)1 ArrayList (java.util.ArrayList)1 Attribute (javax.management.Attribute)1 MBeanOperationInfo (javax.management.MBeanOperationInfo)1 MBeanParameterInfo (javax.management.MBeanParameterInfo)1 QueuedThreadPool (org.eclipse.jetty.util.thread.QueuedThreadPool)1 Ignore (org.junit.Ignore)1