Package org.apache.felix.ipojo

Examples of org.apache.felix.ipojo.ComponentFactory.stop()


        try {
            ComponentFactory cf = new ComponentFactory(getContext(), getNoField());
            cf.start();
            ComponentInstance ci = cf.createComponentInstance(props);
            ci.dispose();
            cf.stop();
            fail("A service requirement with neither field and method must be rejected " + cf);
        } catch (ConfigurationException e) {
           // OK
        } catch (UnacceptableConfiguration e) {
            fail("Unexpected exception when creating an instance : " + e.getMessage());
View Full Code Here


        try {
            ComponentFactory cf = new ComponentFactory(getContext(), getBadField());
            cf.start();
            ComponentInstance ci = cf.createComponentInstance(props);
            ci.dispose();
            cf.stop();
            fail("A service requirement with a bad field must be rejected " + cf);
        }catch (ConfigurationException e) {
           // OK
        } catch (UnacceptableConfiguration e) {
            fail("Unexpected exception when creating an instance : " + e.getMessage());
View Full Code Here

        try {
            ComponentFactory cf = new ComponentFactory(getContext(), getBadFilter());
            cf.start();
            ComponentInstance ci = cf.createComponentInstance(props);
            ci.dispose();
            cf.stop();
            fail("A service requirement with a bad filter must be rejected " + cf);
        }catch (ConfigurationException e) {
            //OK
        } catch (UnacceptableConfiguration e) {
            fail("Unexpected exception when creating an instance : " + e.getMessage());
View Full Code Here

        try {
            ComponentFactory cf = new ComponentFactory(getContext(), getBadFrom());
            cf.start();
            ComponentInstance ci = cf.createComponentInstance(props);
            ci.dispose();
            cf.stop();
            fail("A service requirement with a bad from must be rejected " + cf);
        }catch (ConfigurationException e) {
            //OK
        } catch (UnacceptableConfiguration e) {
            fail("Unexpected exception when creating an instance : " + e.getMessage());
View Full Code Here

        try {
            ComponentFactory cf = new ComponentFactory(getContext(), getBadType());
            cf.start();
            ComponentInstance ci = cf.createComponentInstance(props);
            ci.dispose();
            cf.stop();
            fail("A service requirement with a bad type must be rejected " + cf);
        }catch (ConfigurationException e) {
           // OK
        } catch (UnacceptableConfiguration e) {
            fail("Unexpected exception when creating an instance : " + e.getMessage());
View Full Code Here

        try {
            ComponentFactory cf = new ComponentFactory(getContext(), getNothing());
            cf.start();
            ComponentInstance ci = cf.createComponentInstance(props);
            ci.dispose();
            cf.stop();
            fail("A lifecycle callback with a missing method and transition must be rejected " + cf);
        } catch (ConfigurationException e) {
           // OK
        } catch (UnacceptableConfiguration e) {
            fail("Unexpected exception when creating an instance : " + e.getMessage());
View Full Code Here

        try {
            ComponentFactory cf = new ComponentFactory(getContext(), getNoTransition());
            cf.start();
            ComponentInstance ci = cf.createComponentInstance(props);
            ci.dispose();
            cf.stop();
            fail("A lifecycle callback with a missing transition must be rejected " + cf);
        } catch (ConfigurationException e) {
           // OK
        } catch (UnacceptableConfiguration e) {
            fail("Unexpected exception when creating an instance : " + e.getMessage());
View Full Code Here

        try {
            ComponentFactory cf = new ComponentFactory(getContext(), getNoMethod());
            cf.start();
            ComponentInstance ci = cf.createComponentInstance(props);
            ci.dispose();
            cf.stop();
            fail("A lifecycle callback with a missing method must be rejected " + cf);
        }catch (ConfigurationException e) {
           // OK
        } catch (UnacceptableConfiguration e) {
            fail("Unexpected exception when creating an instance : " + e.getMessage());
View Full Code Here

            ComponentInstance ci = cf.createComponentInstance(props);
            if (ci.isStarted()) {
                fail("A lifecycle callback with a bad method must be rejected (instance stills valid)" + cf);
            }
            ci.dispose();
            cf.stop();
        } catch (ConfigurationException e) {
            //The check does not happen in the configure method.
            fail("Unexpected exception when creating an instance : " + e.getMessage());
        } catch (UnacceptableConfiguration e) {
            fail("Unexpected exception when creating an instance : " + e.getMessage());
View Full Code Here

            ci.stop();
            if (ci.isStarted()) {
                fail("A lifecycle callback with a bad method must be rejected (instance stills valid)" + cf);
            }
            ci.dispose();
            cf.stop();
        } catch (ConfigurationException e) {
            //The check does not happen in the configure method.
            fail("Unexpected exception when creating an instance : " + e.getMessage());
        } catch (UnacceptableConfiguration e) {
            fail("Unexpected exception when creating an instance : " + e.getMessage());
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.