Examples of ReferenceBindingProvider


Examples of org.apache.tuscany.sca.provider.ReferenceBindingProvider

     * @param reference
     * @param binding
     * @param chain
     */
    private void addNonBlockingInterceptor(InvocationChain chain) {
        ReferenceBindingProvider provider = getBindingProvider();
        if (provider != null) {
            boolean supportsOneWayInvocation = provider.supportsOneWayInvocation();
            if (!supportsOneWayInvocation) {
                chain.addInterceptor(Phase.REFERENCE, new NonBlockingInterceptor(workScheduler));
            }
        }
    }
View Full Code Here

Examples of org.apache.tuscany.sca.provider.ReferenceBindingProvider

    public InterfaceContract getBindingInterfaceContract() {
        resolve();
        if (bindingInterfaceContract != null) {
            return bindingInterfaceContract;
        }
        ReferenceBindingProvider provider = getBindingProvider();
        if (provider != null) {
            bindingInterfaceContract = provider.getBindingInterfaceContract();
        }
        if (bindingInterfaceContract == null) {
            bindingInterfaceContract = getComponentReferenceInterfaceContract();
        }
        if (bindingInterfaceContract == null) {
View Full Code Here

Examples of org.apache.tuscany.sca.provider.ReferenceBindingProvider

                realBinding = ((PojoBinding)b).getUserBinding();
            } else {
                realBinding = b;
            }
            final BindingActivator bindingActivator = bindingActivatorMap.get(realBinding.getClass());
            return new ReferenceBindingProvider() {
                List<InvokerProxy> invokers = new ArrayList<InvokerProxy>();
                private InvokerFactory factory;

                public Invoker createInvoker(Operation operation) {
                    InvokerProxy invoker = new InvokerProxy(factory, operation);
View Full Code Here

Examples of org.apache.tuscany.sca.provider.ReferenceBindingProvider

     */
    private void addReferenceBindingInterceptor(ComponentReference reference,
                                                Binding binding,
                                                InvocationChain chain,
                                                Operation operation) {
        ReferenceBindingProvider provider = ((RuntimeComponentReference)reference).getBindingProvider(binding);
        if (provider != null) {
            Invoker invoker = provider.createInvoker(operation);
            if (invoker != null) {
                chain.addInvoker(invoker);
            }
        }
        List<PolicyProvider> pps = ((RuntimeComponentReference)reference).getPolicyProviders(binding);
View Full Code Here

Examples of org.apache.tuscany.sca.provider.ReferenceBindingProvider

     * @param reference
     * @param binding
     * @param chain
     */
    private void addNonBlockingInterceptor(ComponentReference reference, Binding binding, InvocationChain chain) {
        ReferenceBindingProvider provider = ((RuntimeComponentReference)reference).getBindingProvider(binding);
        if (provider != null) {
            boolean supportsOneWayInvocation = provider.supportsOneWayInvocation();
            if (!supportsOneWayInvocation) {
                chain.addInterceptor(Phase.REFERENCE, new NonBlockingInterceptor(workScheduler));
            }
        }
    }
View Full Code Here

Examples of org.apache.tuscany.sca.provider.ReferenceBindingProvider

            }
            // RuntimeComponentReference runtimeRef =
            // ((RuntimeComponentReference)ref);
            // runtimeRef.setComponent(component);
            for (Binding binding : targetReference.getBindings()) {
                ReferenceBindingProvider bindingProvider = targetReference
                        .getBindingProvider(binding);
                if (bindingProvider != null) {
                    bindingProvider.start();
                }

            }

            ImplementationProvider implementationProvider = source
View Full Code Here

Examples of org.apache.tuscany.sca.provider.ReferenceBindingProvider

    public void start(RuntimeComponent component, RuntimeComponentReference ref) {
        synchronized (ref) {
            resolveTargets(ref);
            for (Binding binding : ref.getBindings()) {
                ReferenceBindingProvider provider = ref.getBindingProvider(binding);
                if (provider == null) {
                    provider = addReferenceBindingProvider(component, ref, binding);
                }
                if (provider != null) {
                    provider.start();
                }
                addReferenceWire(component, ref, binding);
            }
        }
    }
View Full Code Here

Examples of org.apache.tuscany.sca.provider.ReferenceBindingProvider

                                                                 RuntimeComponentReference reference,
                                                                 Binding binding) {
        BindingProviderFactory providerFactory =
            (BindingProviderFactory)providerFactories.getProviderFactory(binding.getClass());
        if (providerFactory != null) {
            @SuppressWarnings("unchecked")
            ReferenceBindingProvider bindingProvider =
                providerFactory.createReferenceBindingProvider((RuntimeComponent)component,
                                                               (RuntimeComponentReference)reference,
                                                               binding);
            if (bindingProvider != null) {
View Full Code Here

Examples of org.apache.tuscany.sca.provider.ReferenceBindingProvider

                logger.fine("Starting component reference: " + component.getURI() + "#" + reference.getName());
            }
            RuntimeComponentReference runtimeRef = ((RuntimeComponentReference)reference);
            runtimeRef.setComponent(runtimeComponent);
            for (Binding binding : reference.getBindings()) {
                ReferenceBindingProvider bindingProvider = runtimeRef.getBindingProvider(binding);
                if (bindingProvider != null) {
                    bindingProvider.start();
                }
            }
        }

        for (ComponentService service : component.getServices()) {
            if (logger.isLoggable(Level.FINE)) {
                logger.fine("Starting component service: " + component.getURI() + "#" + service.getName());
            }
            RuntimeComponentService runtimeService = (RuntimeComponentService)service;
            for (Binding binding : service.getBindings()) {
                ServiceBindingProvider bindingProvider = runtimeService.getBindingProvider(binding);
                if (bindingProvider != null) {
                    bindingProvider.start();
                }
            }
        }

        Implementation implementation = component.getImplementation();
View Full Code Here

Examples of org.apache.tuscany.sca.provider.ReferenceBindingProvider

            if (logger.isLoggable(Level.FINE)) {
                logger.fine("Starting component reference: " + component.getURI() + "#" + reference.getName());
            }
            RuntimeComponentReference runtimeRef = ((RuntimeComponentReference)reference);
            for (Binding binding : reference.getBindings()) {
                ReferenceBindingProvider bindingProvider = runtimeRef.getBindingProvider(binding);
                if (bindingProvider != null) {
                    bindingProvider.stop();
                }
            }
        }
        Implementation implementation = component.getImplementation();
        if (implementation instanceof Composite) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.