Examples of BlueprintStateMBean


Examples of org.apache.aries.jmx.blueprint.BlueprintStateMBean

        }
        if (-1==sampleBundleId) fail("Blueprint Sample Bundle is not found!");
        if (-1==extenderBundleId) fail("Blueprint Extender Bundle is not found!");
       
        //retrieve the proxy object
        BlueprintStateMBean stateProxy = MBeanServerInvocationHandler.newProxyInstance(mbeanServer, new ObjectName(BlueprintStateMBean.OBJECTNAME), BlueprintStateMBean.class, false);
       
        // test getBlueprintBundleIds
        long[] bpBundleIds = stateProxy.getBlueprintBundleIds();
        assertEquals("The blueprint bundle ids are: " + Arrays.toString(bpBundleIds), 3, bpBundleIds.length);
        // test getLastEvent
        BlueprintEventValidator sampleValidator = new BlueprintEventValidator(sampleBundleId, extenderBundleId, 2);
        sampleValidator.validate(stateProxy.getLastEvent(sampleBundleId));
        // test getLastEvents
        TabularData lastEvents = stateProxy.getLastEvents();
        assertEquals(BlueprintStateMBean.OSGI_BLUEPRINT_EVENTS_TYPE,lastEvents.getTabularType());
        sampleValidator.validate(lastEvents.get(new Long[]{sampleBundleId}));
       
        //////////////////////////////
        //Test BlueprintMetadataMBean
View Full Code Here

Examples of org.apache.aries.jmx.blueprint.BlueprintStateMBean

        }
        if (-1==sampleBundleId) fail("Blueprint Sample Bundle is not found!");
        if (-1==extenderBundleId) fail("Blueprint Extender Bundle is not found!");
       
        //retrieve the proxy object
        BlueprintStateMBean stateProxy = (BlueprintStateMBean) MBeanServerInvocationHandler.newProxyInstance(mbeanServer, new ObjectName(BlueprintStateMBean.OBJECTNAME), BlueprintStateMBean.class, false);
       
        // test getBlueprintBundleIds
        long[] bpBundleIds = stateProxy.getBlueprintBundleIds();
        assertEquals(2, bpBundleIds.length);
        // test getLastEvent
        BlueprintEventValidator sampleValidator = new BlueprintEventValidator(sampleBundleId, extenderBundleId, 2);
        sampleValidator.validate(stateProxy.getLastEvent(sampleBundleId));
        // test getLastEvents
        TabularData lastEvents = stateProxy.getLastEvents();
        assertEquals(BlueprintStateMBean.OSGI_BLUEPRINT_EVENTS_TYPE,lastEvents.getTabularType());
        sampleValidator.validate(lastEvents.get(new Long[]{sampleBundleId}));
       
        //////////////////////////////
        //Test BlueprintMetadataMBean
View Full Code Here

Examples of org.apache.aries.jmx.blueprint.BlueprintStateMBean

        }
        if (-1==sampleBundleId) fail("Blueprint Sample Bundle is not found!");
        if (-1==extenderBundleId) fail("Blueprint Extender Bundle is not found!");
       
        //retrieve the proxy object
        BlueprintStateMBean stateProxy = (BlueprintStateMBean) MBeanServerInvocationHandler.newProxyInstance(mbeanServer, new ObjectName(BlueprintStateMBean.OBJECTNAME), BlueprintStateMBean.class, false);
       
        // test getBlueprintBundleIds
        long[] bpBundleIds = stateProxy.getBlueprintBundleIds();
        assertEquals(2, bpBundleIds.length);
        // test getLastEvent
        BlueprintEventValidator sampleValidator = new BlueprintEventValidator(sampleBundleId, extenderBundleId, 2);
        sampleValidator.validate(stateProxy.getLastEvent(sampleBundleId));
        // test getLastEvents
        TabularData lastEvents = stateProxy.getLastEvents();
        assertEquals(BlueprintStateMBean.OSGI_BLUEPRINT_EVENTS_TYPE,lastEvents.getTabularType());
        sampleValidator.validate(lastEvents.get(new Long[]{sampleBundleId}));
       
        //////////////////////////////
        //Test BlueprintMetadataMBean
View Full Code Here

Examples of org.apache.aries.jmx.blueprint.BlueprintStateMBean

        }
        if (-1==sampleBundleId) fail("Blueprint Sample Bundle is not found!");
        if (-1==extenderBundleId) fail("Blueprint Extender Bundle is not found!");
       
        //retrieve the proxy object
        BlueprintStateMBean stateProxy = (BlueprintStateMBean) MBeanServerInvocationHandler.newProxyInstance(mbeanServer, new ObjectName(BlueprintStateMBean.OBJECTNAME), BlueprintStateMBean.class, false);
       
        // test getBlueprintBundleIds
        long[] bpBundleIds = stateProxy.getBlueprintBundleIds();
        assertEquals(2, bpBundleIds.length);
        // test getLastEvent
        BlueprintEventValidator sampleValidator = new BlueprintEventValidator(sampleBundleId, extenderBundleId, 2);
        sampleValidator.validate(stateProxy.getLastEvent(sampleBundleId));
        // test getLastEvents
        TabularData lastEvents = stateProxy.getLastEvents();
        assertEquals(BlueprintStateMBean.OSGI_BLUEPRINT_EVENTS_TYPE,lastEvents.getTabularType());
        sampleValidator.validate(lastEvents.get(new Long[]{sampleBundleId}));
       
        //////////////////////////////
        //Test BlueprintMetadataMBean
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.