Package org.apache.tuscany.sca.core

Examples of org.apache.tuscany.sca.core.DefaultUtilityExtensionPoint


      long start = System.currentTimeMillis();
     
        // Create our extension point registry
        registry = new DefaultExtensionPointRegistry();
       
        UtilityExtensionPoint utilities = new DefaultUtilityExtensionPoint(registry);
        registry.addExtensionPoint(utilities);

        // Get work scheduler
        workScheduler = utilities.getUtility(WorkScheduler.class);

        // Create an interface contract mapper
        InterfaceContractMapper mapper = utilities.getUtility(InterfaceContractMapper.class);

        // Get factory extension point
        ModelFactoryExtensionPoint factories = new DefaultModelFactoryExtensionPoint();
        registry.addExtensionPoint(factories);
       
        // Get Message factory
        MessageFactory messageFactory = factories.getFactory(MessageFactory.class);

        // Get proxy factory
        ProxyFactoryExtensionPoint proxyFactories = registry.getExtensionPoint(ProxyFactoryExtensionPoint.class)
        proxyFactory = new ExtensibleProxyFactory(proxyFactories);

        // Create model factories
        assemblyFactory = new RuntimeAssemblyFactory();
        factories.addFactory(assemblyFactory);
        PolicyFactory policyFactory = new DefaultPolicyFactory();
        factories.addFactory(policyFactory);
       
        // Load the runtime modules
        modules = loadModules(registry);
       
        // Start the runtime modules
        startModules(registry, modules);
       
        SCABindingFactory scaBindingFactory = factories.getFactory(SCABindingFactory.class);
        IntentAttachPointTypeFactory intentAttachPointTypeFactory = new DefaultIntentAttachPointTypeFactory();
        factories.addFactory(intentAttachPointTypeFactory);
        ContributionFactory contributionFactory = factories.getFactory(ContributionFactory.class);
       
        // Create a monitor
        MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
       
        if (monitorFactory != null){
            monitor = monitorFactory.createMonitor();
        } else {
            monitorFactory = new DefaultMonitorFactoryImpl();
            monitor = monitorFactory.createMonitor();
            utilities.addUtility(monitorFactory);
            //logger.fine("No MonitorFactory is found on the classpath.");
        }
       
        // Create a contribution service
        policyDefinitions = new ArrayList<SCADefinitions>();
View Full Code Here


    /**
     * @throws java.lang.Exception
     */
    @BeforeClass
    public static void setUpBeforeClass() throws Exception {
        ep = new DefaultUtilityExtensionPoint(new DefaultExtensionPointRegistry());
        ep.start();
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.core.DefaultUtilityExtensionPoint

Copyright © 2018 www.massapicom. 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.