Package org.apache.tuscany.sca.core

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


    private static URLArtifactProcessorExtensionPoint artifactProcessors;

    @BeforeClass
    public static void setUp() throws Exception {
        ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
        artifactProcessors = new DefaultURLArtifactProcessorExtensionPoint(extensionPoints);
        artifactProcessors.addArtifactProcessor(new FileTypeArtifactProcessor());
        artifactProcessors.addArtifactProcessor(new FileNameArtifactProcessor());
    }
View Full Code Here


    private ContributionFactory factory;
    private ProcessorContext context;

    @Before
    public void setUp() throws Exception {
        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        ModelResolverExtensionPoint resolvers = new DefaultModelResolverExtensionPoint(registry);
        resolvers.addResolver(Model.class, TestModelResolver.class);
        context = new ProcessorContext();
        FactoryExtensionPoint factories = new DefaultFactoryExtensionPoint(registry);
View Full Code Here

    public void start() throws ActivationException {
      long start = System.currentTimeMillis();
     
        // Create our extension point registry
        registry = new DefaultExtensionPointRegistry();

        //Get work scheduler
        workScheduler = registry.getExtensionPoint(WorkScheduler.class);

        // Create an interface contract mapper
View Full Code Here

import org.oasisopen.sca.NoSuchDomainException;

public class RuntimeUtils {

    public static ExtensionPointRegistry createExtensionPointRegistry() throws NoSuchDomainException {
        ExtensionPointRegistry extensionsRegistry = new DefaultExtensionPointRegistry();
        extensionsRegistry.start();

        FactoryExtensionPoint modelFactories = extensionsRegistry.getExtensionPoint(FactoryExtensionPoint.class);
        RuntimeAssemblyFactory assemblyFactory = new RuntimeAssemblyFactory(extensionsRegistry);
        modelFactories.addFactory(assemblyFactory);

        UtilityExtensionPoint utilities = extensionsRegistry.getExtensionPoint(UtilityExtensionPoint.class);
       
        Properties domainConfigProps = new Properties();
        domainConfigProps.setProperty("client", "true");
        utilities.getUtility(RuntimeProperties.class).setProperties(domainConfigProps);

        // TODO: is this needed?
        utilities.getUtility(WorkScheduler.class);

        // Initialize the Tuscany module activators
        // The module activators will be started
        extensionsRegistry.getExtensionPoint(ModuleActivatorExtensionPoint.class);
       
        return extensionsRegistry;
    }
View Full Code Here

        DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(registry);
        domainRegistryFactory.getEndpointRegistry(properties.getProperty("reguri"), properties.getProperty("defaultDomainName"));
    }

    protected ExtensionPointRegistry createExtensionPointRegistry() {
        return new DefaultExtensionPointRegistry();
    }
View Full Code Here

    private DOMWrapperHandler handler;
    private Operation op;

    @Before
    public void setUp() throws Exception {
      ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
      this.domHelper = DOMHelper.getInstance(registry);
        this.handler = new DOMWrapperHandler(domHelper);

        List<ElementInfo> elements = new ArrayList<ElementInfo>();
        for (QName inQName : new QName[] { INPUT1, INPUT2, INPUT3, INPUT4 }) {
View Full Code Here

    private static URLArtifactProcessor<Definitions> policyDefinitionsProcessor;
    private static ProcessorContext context;
   
    @BeforeClass
    public static void setUp() throws Exception {
        DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
        context = new ProcessorContext(extensionPoints);
        inputFactory = XMLInputFactory.newInstance();
        StAXArtifactProcessorExtensionPoint staxProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null);
        resolver = new DefaultModelResolver();

        FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
        SCABindingFactory scaBindingFactory = new TestSCABindingFactoryImpl();
        modelFactories.addFactory(scaBindingFactory);

        URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
        policyDefinitionsProcessor = documentProcessors.getProcessor(Definitions.class);
    }
View Full Code Here

    private static ValidatorHandler handler;
    private static ProcessorContext context;

    @BeforeClass
    public static void setUp() throws Exception {
        DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
        context = new ProcessorContext(extensionPoints);
        URLArtifactProcessorExtensionPoint documentProcessors =
            extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
        documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors);

        StAXArtifactProcessorExtensionPoint staxProcessors =
            extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
        inputFactory = XMLInputFactory.newInstance();
        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null);

        resolver = new DefaultModelResolver();
        handler = getValidationHandler();
View Full Code Here

        reader.parse(new InputSource(url.openStream()));
    }

    @Test
    public void testReadImplementation() throws Exception {
        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        ValidationSchemaExtensionPoint schemas = new DefaultValidationSchemaExtensionPoint(registry, new HashMap<String, String>());
        schemas.addSchema(getClass().getClassLoader().getResource(TUSCANY_11_XSD).toString());
        XMLInputFactory validatingInputFactory = new DefaultValidatingXMLInputFactory(inputFactory, schemas);
        DefaultFactoryExtensionPoint factories = new DefaultFactoryExtensionPoint(registry);
        factories.addFactory(validatingInputFactory);
View Full Code Here

    }

    @Test
    public void testReadBinding() throws Exception {

        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        ValidationSchemaExtensionPoint schemas = new DefaultValidationSchemaExtensionPoint(registry, new HashMap<String, String>());
        schemas.addSchema(getClass().getClassLoader().getResource(TUSCANY_11_XSD).toString());
        XMLInputFactory validatingInputFactory = new DefaultValidatingXMLInputFactory(inputFactory, schemas);
        DefaultFactoryExtensionPoint factories = new DefaultFactoryExtensionPoint(registry);
        factories.addFactory(validatingInputFactory);
View Full Code Here

TOP

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

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.