Package org.apache.tuscany.sca.provider

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


     * @param binding
     * @return
     */
    private InterfaceContract getInterfaceContract(ComponentReference reference, Binding binding) {
        InterfaceContract interfaceContract = reference.getInterfaceContract();
        ReferenceBindingProvider provider = ((RuntimeComponentReference)reference).getBindingProvider(binding);
        if (provider != null) {
            InterfaceContract bindingContract = provider.getBindingInterfaceContract();
            if (bindingContract != null) {
                interfaceContract = bindingContract;
            }
        }
        return interfaceContract.makeUnidirectional(false);
View Full Code Here


     */
    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

     * @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

                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

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

                                             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

                }
            }
        }
        for (ComponentReference reference : component.getReferences()) {
            for (Binding binding : reference.getBindings()) {
                ReferenceBindingProvider bindingProvider =
                    ((RuntimeComponentReference)reference).getBindingProvider(binding);
                if (bindingProvider != null) {
                    bindingProvider.stop();
                }
            }
        }
        Implementation implementation = component.getImplementation();
        if (implementation instanceof Composite) {
View Full Code Here

     * @param binding
     * @return
     */
    private InterfaceContract getInterfaceContract(ComponentReference reference, Binding binding) {
        InterfaceContract interfaceContract = reference.getInterfaceContract();
        ReferenceBindingProvider provider = ((RuntimeComponentReference)reference).getBindingProvider(binding);
        if (provider != null) {
            InterfaceContract bindingContract = provider.getBindingInterfaceContract();
            if (bindingContract != null) {
                interfaceContract = bindingContract;
            }
        }
        return interfaceContract.makeUnidirectional(false);
View Full Code Here

    private void addBindingInterceptor(ComponentReference reference,
                                       Binding binding,
                                       InvocationChain chain,
                                       Operation operation) {
        try {
            ReferenceBindingProvider provider = ((RuntimeComponentReference)reference).getBindingProvider(binding);
            if (provider != null) {
                Invoker invoker = null;
                if (provider instanceof ReferenceBindingProvider2) {
                    invoker = ((ReferenceBindingProvider2)provider).createInvoker(operation);
                } else {
                    // must be an old provider that only has the deprecated signature
                    invoker = provider.createInvoker(operation, false);
                }
                if (invoker != null) {
                    chain.addInvoker(invoker);
                }
            }
View Full Code Here

     * @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 supportsAsyncOneWayInvocation = false;
            if (provider instanceof ReferenceBindingProvider2) {
                supportsAsyncOneWayInvocation = ((ReferenceBindingProvider2)provider).supportsAsyncOneWayInvocation();
            } else {
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.provider.ReferenceBindingProvider

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.