Package org.apache.tuscany.sca.runtime

Examples of org.apache.tuscany.sca.runtime.RuntimeWire


        return false;
    }

    public void start() {
        RuntimeComponentService componentService = (RuntimeComponentService)service;
        RuntimeWire wire = componentService.getRuntimeWire(binding);

        FeedBindingListenerServlet servlet =
            new FeedBindingListenerServlet(wire, messageFactory, mediator, "atom_1.0");

        servletMapping = binding.getURI();
View Full Code Here


        }
        return null;
    }

    public RuntimeWire getRuntimeWire(Binding binding, InterfaceContract interfaceContract) {
        RuntimeWire wire = getRuntimeWire(binding);
        if (wire == null) {
            return null;
        }
        if (interfaceContract != null && interfaceContract != wire.getSource().getInterfaceContract()) {
            try {
                // FIXME: [rfeng] We could avoid clone() using a better comparison of the two interface contracts
                wire = (RuntimeWire)wire.clone();
                wire.getSource().setInterfaceContract(interfaceContract);
                wire.rebuild();
            } catch (CloneNotSupportedException e) {
                throw new ServiceRuntimeException(e);
            }
        }
View Full Code Here

            return null;
        }
    }

    public InvocationChain getInvocationChain(Binding binding, InterfaceContract interfaceContract, Operation operation) {
        RuntimeWire wire = getRuntimeWire(binding);
        if (wire == null) {
            return null;
        }
        if (interfaceContract != null && interfaceContract != wire.getSource().getInterfaceContract()) {
            try {
                // FIXME: [rfeng] We could avoid clone() using a better comparison of the two interface contracts
                wire = (RuntimeWire)wire.clone();
                wire.getSource().setInterfaceContract(interfaceContract);
                wire.rebuild();
            } catch (CloneNotSupportedException e) {
                throw new ServiceRuntimeException(e);
            }
        }
        return wire.getInvocationChain(operation);
    }
View Full Code Here

        return false;
    }

    public void start() {
        RuntimeComponentService componentService = (RuntimeComponentService)service;
        RuntimeWire wire = componentService.getRuntimeWire(binding);

        RSSBindingListenerServlet servlet =
            new RSSBindingListenerServlet(wire, messageFactory, mediator);

        servletMapping = binding.getURI();
View Full Code Here

        return false;
    }

    public void start() {
        RuntimeComponentService componentService = (RuntimeComponentService)service;
        RuntimeWire wire = componentService.getRuntimeWire(binding);

        FeedBindingListenerServlet servlet =
            new FeedBindingListenerServlet(wire, messageFactory, mediator, "rss_2.0");

        servletMapping = binding.getURI();
View Full Code Here

    public void setBindingProvider(Binding binding, ReferenceBindingProvider bindingProvider) {
        bindingProviders.put(binding, bindingProvider);
    }

    public Invoker getInvoker(Binding binding, Operation operation) {
        RuntimeWire wire = getRuntimeWire(binding);
        if (wire == null) {
            return null;
        }
        InvocationChain chain = wire.getInvocationChain(operation);
        return chain == null ? null : chain.getHeadInvoker();
    }
View Full Code Here

    public Object invoke(Operation operation, Message msg) throws InvocationTargetException {
        return invoke(wire, operation, msg);
    }

    public Object invoke(RuntimeWire wire, Operation operation, Message msg) throws InvocationTargetException {
        RuntimeWire runtimeWire = wire == null ? this.wire : wire;
        InvocationChain chain = runtimeWire.getInvocationChain(operation);
        return invoke(chain, msg, runtimeWire);
    }
View Full Code Here

        // FIXME: Should we normalize the componentName/serviceName URI into an absolute SCA URI in the SCA binding?
        // sca:component1/component11/component112/service1?
        this.compositeActivator = compositeActivator;
        this.conversationManager = this.compositeActivator.getConversationManager();
        RuntimeWire wire = this.reference.getRuntimeWire(this.binding);
        // init(wire);
        initCallbackID();
    }
View Full Code Here

        }

        EndpointReference wireTarget =
            new EndpointReferenceImpl((RuntimeComponent)serviceComponent, service, serviceBinding, bindingContract);

        RuntimeWire wire =
            new RuntimeWireImpl(wireSource, wireTarget, interfaceContractMapper, workScheduler, wireProcessor,
                                messageFactory, conversationManager);
        runtimeRef.getRuntimeWires().add(wire);

        return wire;
View Full Code Here

        EndpointReference wireTarget =
            new EndpointReferenceImpl((RuntimeComponent)serviceComponent, (RuntimeComponentService)service,
                                      serviceBinding, targetContract);

        RuntimeWire wire =
            new RuntimeWireImpl(wireSource, wireTarget, interfaceContractMapper, workScheduler, wireProcessor,
                                messageFactory, conversationManager);
        runtimeService.getRuntimeWires().add(wire);

        return wire;
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.runtime.RuntimeWire

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.