Package org.apache.tuscany.core.wire

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


     * @param serviceName the service name associated with the wire
     * @param interfaze   the interface associated with the wire
     */
    public static <T> InboundWire createInboundWire(String serviceName, Class<T> interfaze)
        throws InvalidServiceContractException {
        InboundWire wire = new InboundWireImpl();
        JavaInterfaceProcessorRegistry registry = new JavaInterfaceProcessorRegistryImpl();
        ServiceContract<?> contract = registry.introspect(interfaze);
        wire.setServiceContract(contract);
        wire.setServiceName(serviceName);
        wire.addInvocationChains(createInboundChains(interfaze));
        return wire;
    }
View Full Code Here


            }
        }
    }

    public void createWires(Reference reference, ServiceContract<?> contract) {
        InboundWire inboundWire = new InboundWireImpl();
        inboundWire.setServiceContract(contract);
        inboundWire.setContainer(reference);
        for (Operation<?> operation : contract.getOperations().values()) {
            InboundInvocationChain chain = createInboundChain(operation);
            inboundWire.addInvocationChain(operation, chain);
        }
        OutboundWire outboundWire = new OutboundWireImpl();

        // [rfeng] Check if the Reference has the binding contract
        ServiceContract<?> bindingContract = reference.getBindingServiceContract();
View Full Code Here

        }
        return wire;
    }

    public InboundWire createWire(ServiceDefinition service) {
        InboundWire wire = new InboundWireImpl();
        ServiceContract<?> contract = service.getServiceContract();
        wire.setServiceContract(contract);
        wire.setServiceName(service.getName());
        for (Operation<?> operation : contract.getOperations().values()) {
            InboundInvocationChain chain = createInboundChain(operation);
            // TODO handle policy
            //TODO statement below could be cleaner
            chain.addInterceptor(new InvokerInterceptor());
            wire.addInvocationChain(operation, chain);
        }
        if (contract.getCallbackName() != null) {
            wire.setCallbackReferenceName(service.getCallbackReferenceName());
        }
        return wire;
    }
View Full Code Here

        }
        return wire;
    }

    public void createWires(Service service, String targetName, ServiceContract<?> contract) {
        InboundWire inboundWire = new InboundWireImpl();

        // [rfeng] Check if the Reference has the binding contract
        ServiceContract<?> bindingContract = service.getBindingServiceContract();
        if (bindingContract == null) {
            bindingContract = contract;
        }
        inboundWire.setServiceContract(bindingContract);
        inboundWire.setContainer(service);
        for (Operation<?> operation : bindingContract.getOperations().values()) {
            InboundInvocationChain inboundChain = createInboundChain(operation);
            inboundWire.addInvocationChain(operation, inboundChain);
        }

        OutboundWire outboundWire = new OutboundWireImpl();
        outboundWire.setServiceContract(contract);
        outboundWire.setTargetName(new QualifiedName(targetName));
View Full Code Here

    }


    public static <T> InboundWire createServiceWire(String serviceName, Class<T> interfaze, Interceptor interceptor)
        throws InvalidServiceContractException {
        InboundWire wire = new InboundWireImpl();
        ServiceContract<?> contract = REGISTRY.introspect(interfaze);
        wire.setServiceContract(contract);
        wire.setServiceName(serviceName);
        wire.addInvocationChains(
            createInboundChains(interfaze, interceptor));
        return wire;
    }
View Full Code Here

        return new SystemAtomicComponentImpl(name, configuration);
    }

    public static <T> InboundWire createTargetWireFactory(String serviceName, Class<T> interfaze)
        throws InvalidServiceContractException {
        InboundWire wire = new InboundWireImpl();
        wire.setServiceName(serviceName);
        JavaServiceContract contract = new JavaServiceContract(interfaze);
        wire.setServiceContract(contract);
        wire.addInvocationChains(createInboundChains(interfaze));
        return wire;
    }
View Full Code Here

TOP

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

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.