Package org.apache.felix.ipojo.api

Examples of org.apache.felix.ipojo.api.PrimitiveComponentType.stop()


        ComponentInstance ci = type.createInstance();

        assertThat("ci is valid", ci.getState(), is(ComponentInstance.VALID));

        // Stop cons
        cons.stop();
        assertThat("ci is invalid", ci.getState(), is(ComponentInstance.INVALID));

        // Restart cons
        cons.start();
        assertThat("ci is valid - 2", ci.getState(), is(ComponentInstance.VALID));
View Full Code Here


        ComponentInstance ci = type.createInstance();

        assertThat("ci is valid", ci.getState(), is(ComponentInstance.VALID));

        // Stop prov
        prov.stop();
        assertThat("ci is valid - 1", ci.getState(), is(ComponentInstance.VALID));

        // Restart prov
        prov.start();
        assertThat("ci is valid - 2", ci.getState(), is(ComponentInstance.VALID));
View Full Code Here

        ComponentInstance ci = type.createInstance();

        assertThat("ci is valid", ci.getState(), is(ComponentInstance.VALID));

        // Stop prov
        prov.stop();
        assertThat("ci is valid - 1", ci.getState(), is(ComponentInstance.VALID));

        // Restart prov
        prov.start();
        prov.createInstance();
View Full Code Here

        PrimitiveComponentType type = createAProvider();
        ci = type.createInstance();
        assertThat("Ci is valid", ci.getState(), is(ComponentInstance.VALID));
        assertThat(ipojoHelper.isServiceAvailableByName(Foo.class.getName(), ci
                .getInstanceName()), is(true));
        type.stop();
        assertThat("Ci is disposed", ci.getState(),
                is(ComponentInstance.DISPOSED));
        assertThat(ipojoHelper.isServiceAvailableByName(Foo.class.getName(), ci
                .getInstanceName()), is(false));
View Full Code Here

        ci = x.createInstance();
        ci.start();
        assertThat(ci.getState(), is(ComponentInstance.VALID));

        x.stop();
    }

    private PrimitiveComponentType createAProvider() {
        return new PrimitiveComponentType()
                .setBundleContext(context)
View Full Code Here

       ComponentInstance ci = type.createInstance();

       assertThat("ci is valid", ci.getState(), is(ComponentInstance.VALID));

       // Stop cons
       cons.stop();
       assertThat("ci is invalid", ci.getState(), is(ComponentInstance.INVALID));

       // Restart cons
       cons.start();
       assertThat("ci is valid - 2", ci.getState(), is(ComponentInstance.VALID));
View Full Code Here

       ComponentInstance ci = type.createInstance();

       assertThat("ci is valid", ci.getState(), is(ComponentInstance.VALID));

       // Stop prov
       prov.stop();
       assertThat("ci is valid - 1", ci.getState(), is(ComponentInstance.VALID));

       // Restart prov
       prov.start();
       assertThat("ci is valid - 2", ci.getState(), is(ComponentInstance.VALID));
View Full Code Here

       ComponentInstance ci = type.createInstance();

       assertThat("ci is valid", ci.getState(), is(ComponentInstance.VALID));

       // Stop prov
       prov.stop();
       assertThat("ci is valid - 1", ci.getState(), is(ComponentInstance.VALID));

       // Restart prov
       prov.start();
       prov.createInstance();
View Full Code Here

        ci = type.createInstance();
        assertThat("Ci is valid", ci.getState(), is(ComponentInstance.VALID));
        ServiceReference ref = ipojo.getServiceReferenceByName(Foo.class
                .getName(), ci.getInstanceName());
        assertThat(ref, is(notNullValue()));
        type.stop();
        assertThat("Ci is disposed", ci.getState(),
                is(ComponentInstance.DISPOSED));
        ref = ipojo.getServiceReferenceByName(Foo.class.getName(), ci
                .getInstanceName());
        assertThat(ref, is(nullValue()));
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.