Examples of Factory


Examples of org.apache.felix.ipojo.Factory

        }
    }

    public static ComponentInstance getComponentInstanceByName(
            BundleContext bc, String factoryName, String name) {
        Factory fact = getFactoryByName(bc, factoryName);

        if (fact == null) {
            System.err.println("Factory " + factoryName + " not found");
            return null;
        }

        try {
            Properties props = new Properties();
            props.put("instance.name",name);
            return fact.createComponentInstance(props);
        } catch (Exception e) {
            System.err.println("Cannot create the instance from " + factoryName
                    + " : " + e.getMessage());
            e.printStackTrace();
            return null;
View Full Code Here

Examples of org.apache.felix.ipojo.Factory

            return null;
        }
    }

    public static ComponentInstance getComponentInstance(BundleContext bc, String factoryName, Dictionary configuration) {
        Factory fact = getFactoryByName(bc, factoryName);

        if (fact == null) {
            System.err.println("Factory " + factoryName + " not found");
            return null;
        }

        // if(fact.isAcceptable(configuration)) {
        try {
            return fact.createComponentInstance(configuration);
        } catch (Exception e) {
            System.err.println("Cannot create the instance from " + factoryName + " : " + e.getMessage());
            e.printStackTrace();
            return null;
        }
View Full Code Here

Examples of org.apache.felix.ipojo.Factory

        // return null;
        // }
    }

    public static ComponentInstance getComponentInstanceByName(BundleContext bc, String factoryName, String name) {
        Factory fact = getFactoryByName(bc, factoryName);

        if (fact == null) {
            System.err.println("Factory " + factoryName + " not found");
            return null;
        }

        try {
            Properties props = new Properties();
            props.put("instance.name",name);
            return fact.createComponentInstance(props);
        } catch (Exception e) {
            System.err.println("Cannot create the instance from " + factoryName + " : " + e.getMessage());
            e.printStackTrace();
            return null;
        }
View Full Code Here

Examples of org.apache.felix.ipojo.Factory

            return null;
        }
    }

    public static ComponentInstance getComponentInstance(ServiceContext bc, String factoryName, Dictionary configuration) {
        Factory fact = getFactoryByName(bc, factoryName);

        if (fact == null) { return null; }

        if (fact.isAcceptable(configuration)) {
            try {
                return fact.createComponentInstance(configuration);
            } catch (Exception e) {
                System.err.println(e.getMessage());
                e.printStackTrace();
                return null;
            }
View Full Code Here

Examples of org.apache.felix.ipojo.Factory

            } else {
              System.out.println("Handler " + name + " (INVALID : " + handlers[i].getMissingHandlers() + ")");
            }
        }

        Factory factory = IPojoTestUtils.getFactoryByName(context, "donut-provider-publishes");
        assertNotNull(factory);
        System.out.println(factory.getDescription());

        // Send donuts and check the sender instance name
        Event receivedEvent;
        for (int i = 0; i < NUMBER_OF_EAH_PROVIDERS; i++) {
            m_eahProviders[i].sellDonut();
View Full Code Here

Examples of org.apache.isis.viewer.dnd.form.ExpandableViewBorder.Factory

            });

            ViewBuilder collectiontBuilder = new CollectionElementBuilder(new IconElementFactory());

            {
                final Factory decorator = new ExpandableViewBorder.Factory(null, TreeNodeSpecification.this, null);
                objectBuilder.addSubviewDecorator(decorator);
                collectiontBuilder.addSubviewDecorator(decorator);

            }
View Full Code Here

Examples of org.apache.myfaces.config.impl.digester.elements.Factory

    {
        FacesConfig config = (FacesConfig) facesConfig;
        configs.add(config);
        for (Iterator iterator = config.getFactories().iterator(); iterator.hasNext();)
        {
            Factory factory = (Factory) iterator.next();
            applicationFactories.addAll(factory.getApplicationFactory());
            facesContextFactories.addAll(factory.getFacesContextFactory());
            lifecycleFactories.addAll(factory.getLifecycleFactory());
            renderKitFactories.addAll(factory.getRenderkitFactory());
        }
        components.putAll(config.getComponents());
        validators.putAll(config.getValidators());

        for (Iterator iterator = config.getApplications().iterator(); iterator.hasNext();)
View Full Code Here

Examples of org.apache.pluto.factory.Factory

            factoryInterface = Class.forName (factoryInterfaceName);

            String factoryImplName = (String)factories.get(factoryInterfaceName);
            Class factoryImpl = Class.forName (factoryImplName);
            Factory factory = (Factory) factoryImpl.newInstance ();

            ContainerUtil.enableLogging(factory, this.getLogger());
            ContainerUtil.contextualize(factory, this.context);
            ContainerUtil.service(factory, this.manager);
            ContainerUtil.initialize(factory);
           
            factory.init(this.servletConfig, new HashMap());

            factoryMap.put (factoryInterface.getName(), factory);

            // build up list in reverse order for later destruction
            factoryList.add (0, factory);
View Full Code Here

Examples of org.apache.servicemix.web.filter.Factory

public class ComponentFactoryBean implements FactoryBean {

    private Registry registry;
   
    public Object getObject() throws Exception {
        return new Factory() {
            private String name;
            @SuppressWarnings("unused")
            public void setName(String name) {
                this.name = name;
            }
View Full Code Here

Examples of org.apache.stratum.factory.Factory

        {
            throw new NestableException(
                new NullPointerException("String className"));
        }

        Factory factory = getFactory(className);
        if (factory == null)
        {
            Class clazz;
            try
            {
                clazz = loadClass(className);
            }
            catch (ClassNotFoundException x)
            {
                throw new NestableException(
                    "Instantiation failed for class " + className,x);
            }
            return getInstance(clazz);
        }
        else
        {
            return factory.getInstance();
        }
    }
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.