Examples of createComponentInstance()


Examples of intf.container.XCATContainer.createComponentInstance()

    XCATComponentID cid = null;
    if (componentType.equals("basic")) {
      container = new BasicContainer();

      // Instantiate the component
      container.createComponentInstance(instanceName,
          componentHandle,
          className);     
      // Create an instance of the client side of XCATComponentID
      cid = new XCATComponentIDClientImpl(instanceName, componentHandle);
    } else if (componentType.equals("mobile")) {
View Full Code Here

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

        // Provider
        ComponentFactory providerFactory = new ComponentFactory(getContext(),
                m_provider);
        providerFactory.start();
        properties.put("instance.name","Emperor of donuts");
        ComponentInstance providerInstance = providerFactory
                .createComponentInstance(properties);
        ServiceReference providerService = IPojoTestUtils
                .getServiceReferenceByName(getContext(), DonutProvider.class
                        .getName(), providerInstance.getInstanceName());
        DonutProvider provider = (DonutProvider) getContext()
View Full Code Here

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

        ComponentFactory consumerFactory = new ComponentFactory(getContext(),
                m_consumer);
        consumerFactory.start();
        properties.put("instance.name","Homer Simpson");
        properties.put("slow", "false");
        ComponentInstance consumerInstance = consumerFactory
                .createComponentInstance(properties);
        ServiceReference consumerService = IPojoTestUtils
                .getServiceReferenceByName(getContext(), DonutConsumer.class
                        .getName(), consumerInstance.getInstanceName());
        DonutConsumer consumer = (DonutConsumer) getContext()
View Full Code Here

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

        Dictionary conf = new Hashtable();
        conf.put("instance.name","provider without topics");

        ComponentInstance instance;
        try {
            instance = fact.createComponentInstance(conf);
            // Should not be executed
            instance.dispose();
            fail("The factory must not create instance without specified topics.");
        } catch (ConfigurationException e) {
            // OK
View Full Code Here

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

        topics.put("donut-publisher", "| |\\| \\/ /-\\ |_ | |)");
        conf.put("event.topics", topics);

        ComponentInstance instance;
        try {
            instance = fact.createComponentInstance(conf);
            // Should not be executed
            instance.dispose();
            fail("The factory must not create instance with invalid specified topics.");
        } catch (ConfigurationException e) {
            // OK
View Full Code Here

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

        conf.put("instance.name","consumer without topics");
        conf.put("slow", "false");

        ComponentInstance instance;
        try {
            instance = fact.createComponentInstance(conf);
            // Should not be executed
            instance.dispose();
            fail("The factory must not create instance without specified topics.");
        } catch (ConfigurationException e) {
            // OK
View Full Code Here

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

        topics.put("donut-subscriber", "| |\\| \\/ /-\\ |_ | |)");
        conf.put("event.topics", topics);

        ComponentInstance instance;
        try {
            instance = fact.createComponentInstance(conf);
            // Should not be executed
            instance.dispose();
            fail("The factory must not create instance with invalid specified topics.");
        } catch (ConfigurationException e) {
            // OK
View Full Code Here

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

    // First inject a configuration triggering an exception of the validate method.
    Properties props = new Properties();
    props.put("prop", "KO");
    ComponentInstance ci = null;
    try {
      ci = factory.createComponentInstance(props);
    } catch (UnacceptableConfiguration e) {
      e.printStackTrace();
    } catch (MissingHandlerException e) {
      e.printStackTrace();
    } catch (ConfigurationException e) {
View Full Code Here

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

    // First inject a configuration triggering an exception of the validate method.
    Properties props = new Properties();
    props.put("prop", "KO");
    ComponentInstance ci = null;
    try {
      ci = factory.createComponentInstance(props);
    } catch (UnacceptableConfiguration e) {
      e.printStackTrace();
    } catch (MissingHandlerException e) {
      e.printStackTrace();
    } catch (ConfigurationException e) {
View Full Code Here

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

    // First inject a configuration triggering an exception of the validate method.
    Properties props = new Properties();
    props.put("controller", "false");
    ComponentInstance ci = null;
    try {
      ci = factory.createComponentInstance(props);
    } catch (UnacceptableConfiguration e) {
      e.printStackTrace();
    } catch (MissingHandlerException e) {
      e.printStackTrace();
    } catch (ConfigurationException e) {
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.