Package org.apache.tuscany.core.loader

Examples of org.apache.tuscany.core.loader.LoaderContext


    public Module loadModule(URL url) throws ConfigurationLoadException {
        registry.setContext(modelContext);
        try {
            XMLStreamReader reader = xmlFactory.createXMLStreamReader(url.openStream());
            getDocumentRoot(reader);
            return (Module) registry.load(reader, new LoaderContext(resourceLoader));
        } catch (XMLStreamException e) {
            ConfigurationLoadException ce = new ConfigurationLoadException(e);
            ce.setResourceURI(url.toString());
            throw ce;
        } catch (IOException e) {
View Full Code Here


    public ModuleFragment loadModuleFragment(URL url) throws ConfigurationLoadException {
        registry.setContext(modelContext);
        try {
            XMLStreamReader reader = xmlFactory.createXMLStreamReader(url.openStream());
            getDocumentRoot(reader);
            return (ModuleFragment) registry.load(reader, new LoaderContext(resourceLoader));
        } catch (XMLStreamException e) {
            ConfigurationLoadException ce = new ConfigurationLoadException(e);
            ce.setResourceURI(url.toString());
            throw ce;
        } catch (IOException e) {
View Full Code Here

        EasyMock.expectLastCall().andReturn("http://objectweb.org/hello_world_soap_http");
        reader.getAttributeValue(null, "port");
        EasyMock.expectLastCall().andReturn("SoapPort");
        EasyMock.replay(reader);
       
        LoaderContext loaderContext = new LoaderContext(null);
       
        assertNotNull("Did not load binding", loader.load(reader, loaderContext));
       
    }
View Full Code Here

    protected void setUp() throws Exception {
        super.setUp();
        assemblyFactory = new SystemAssemblyFactoryImpl();
        resourceLoader = new ResourceLoaderImpl(getClass().getClassLoader());
        loaderContext = new LoaderContext(resourceLoader);
        modelContext = new AssemblyContextImpl(assemblyFactory, null, resourceLoader);
        xmlFactory = XMLInputFactory.newInstance();
        registry = new StAXLoaderRegistryImpl();
        registry.setMonitor(NULL_MONITOR);
    }
View Full Code Here

    protected void setUp() throws Exception {
        super.setUp();
        assemblyFactory = new SystemAssemblyFactoryImpl();
        resourceLoader = new ResourceLoaderImpl(getClass().getClassLoader());
        loaderContext = new LoaderContext(resourceLoader);
        modelContext = new AssemblyContextImpl(assemblyFactory, null, resourceLoader);
        xmlFactory = XMLInputFactory.newInstance();
        registry = new StAXLoaderRegistryImpl();
        registry.setMonitor(org.apache.tuscany.databinding.sdo.LoaderTestSupport.NULL_MONITOR);
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.core.loader.LoaderContext

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.