Package org.apache.tuscany.core.wire

Examples of org.apache.tuscany.core.wire.WireTargetConfiguration


        target.addInterceptor(new InvokerInterceptor());

        TargetWireFactory targetFactory = wireFactoryFactory.createTargetWireFactory();
        Map<Method, TargetInvocationConfiguration> targetInvocationConfigs = new MethodHashMap<TargetInvocationConfiguration>();
        targetInvocationConfigs.put(hello, target);
        WireTargetConfiguration targetConfig = new WireTargetConfiguration(new QualifiedName("target/SimpleTarget"),
                targetInvocationConfigs, Thread.currentThread().getContextClassLoader(), msgFactory);
        targetFactory.setConfiguration(targetConfig);
        targetFactory.setBusinessInterface(SimpleTarget.class);

        // connect the source to the target
View Full Code Here


        source.addInterceptor(new InvokerInterceptor());
        source.setTargetInvoker(new MockStaticInvoker(hello, new SimpleTargetImpl()));
        source.build();
        Map<Method, TargetInvocationConfiguration> configs = new MethodHashMap<TargetInvocationConfiguration>();
        configs.put(hello, source);
        WireTargetConfiguration config = new WireTargetConfiguration(new QualifiedName("foo"), configs, Thread.currentThread()
                .getContextClassLoader(), new MessageFactoryImpl());
        JDKTargetWireFactory factory = new JDKTargetWireFactory();
        factory.setConfiguration(config);
        factory.setBusinessInterface(SimpleTarget.class);
        factory.initialize();
View Full Code Here

        Set<Method> javaMethods = JavaIntrospectionHelper.getAllUniqueMethods(interfaze);
        for (Method method : javaMethods) {
            TargetInvocationConfiguration iConfig = new TargetInvocationConfiguration(method);
            iConfigMap.put(method, iConfig);
        }
        WireTargetConfiguration wireConfiguration = new WireTargetConfiguration(targetName, iConfigMap, interfaze.getClassLoader(), messageFactory);
        wireFactory.setBusinessInterface(interfaze);
        wireFactory.setConfiguration(wireConfiguration);
        if (policyRegistry != null) {
            // invoke policy builders
            policyRegistry.buildTarget(configuredService, wireConfiguration);
View Full Code Here

TOP

Related Classes of org.apache.tuscany.core.wire.WireTargetConfiguration

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.