Package org.apache.tuscany.binding.jsonrpc.mocks.tuscany

Examples of org.apache.tuscany.binding.jsonrpc.mocks.tuscany.MockCompositeContextImpl


        context.setAttribute(TuscanyServletListener.MODULE_COMPONENT_NAME, createModuleWithJSONRPCEntryPoint(entryPointName, instance));
        return servletConfig;
    }

    public static CompositeContext createModuleWithJSONRPCEntryPoint(String entryPointName, Object instance) {
        MockCompositeContextImpl cci = new MockCompositeContextImpl();
        Module module = (Module) cci.getComposite();
        List<EntryPoint> entryPoints = module.getEntryPoints();
        EntryPoint ep = createMockEntryPoint(entryPointName);
        addJSONRPCBinding(ep);
        entryPoints.add(ep);
        cci.start();

        Map<String, Context> ics = new HashMap<String, Context>();
        ics.put(entryPointName, new MockEntryPointContext(instance));

        ScopeContext sc = new MockScopeContext(ics);
        sc.start();

        Map<String, ScopeContext> scopeIndex = cci.getScopeIndex();
        scopeIndex.put(entryPointName, sc);

        return cci;
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.binding.jsonrpc.mocks.tuscany.MockCompositeContextImpl

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.