Examples of ReferenceBindingProvider


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

                logger.fine("Starting component reference: " + component.getURI() + "#" + reference.getName());
            }
            RuntimeComponentReference runtimeRef = ((RuntimeComponentReference)reference);
           
            for (EndpointReference2 endpointReference : reference.getEndpointReferences()) {
                final ReferenceBindingProvider bindingProvider = runtimeRef.getBindingProvider(endpointReference.getBinding());
                if (bindingProvider != null) {
                    // Allow bindings to read properties. Requires PropertyPermission read in security policy.
                    AccessController.doPrivileged(new PrivilegedAction<Object>() {
                        public Object run() {
                            bindingProvider.stop();
                            return null;
                          }
                    });                      
                }
            }             
View Full Code Here

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

                    if (runtimeRef.getBindingProvider(endpointReference.getBinding()) == null) {
                        addReferenceBindingProvider(component, componentReference, endpointReference.getBinding());
                    }
                   
                    // start the binding provider  
                    final ReferenceBindingProvider bindingProvider = runtimeRef.getBindingProvider(endpointReference.getBinding());
                   
                    if (bindingProvider != null) {
                        // Allow bindings to add shutdown hooks. Requires RuntimePermission shutdownHooks in policy.
                        AccessController.doPrivileged(new PrivilegedAction<Object>() {
                            public Object run() {
                                bindingProvider.start();
                                return null;
                              }
                        });                      
                    }
                   
View Full Code Here

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

        if (logger.isLoggable(Level.FINE)) {
            logger.fine("Stopping component reference: " + component.getURI() + "#" + reference.getName());
        }
        RuntimeComponentReference runtimeRef = ((RuntimeComponentReference)reference);
        for ( EndpointReference2 endpointReference : runtimeRef.getEndpointReferences()){
            ReferenceBindingProvider bindingProvider = runtimeRef.getBindingProvider(endpointReference.getBinding());
            if (bindingProvider != null) {
                bindingProvider.stop();
            }
        }
    }
View Full Code Here

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

       
    }
   
    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

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

        resolve();

        eprBinder.bindRunTime(endpointRegistry, this);

        // start the binding provider
        final ReferenceBindingProvider bindingProvider = getBindingProvider();

        if (bindingProvider != null) {
            // Allow bindings to add shutdown hooks. Requires RuntimePermission shutdownHooks in policy.
            AccessController.doPrivileged(new PrivilegedAction<Object>() {
                public Object run() {
                    bindingProvider.start();
                    return null;
                }
            });
        }
        for (PolicyProvider policyProvider : getPolicyProviders()) {
View Full Code Here

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

    }

    private void initReferenceBindingInvocationChains() {

        // add the binding interceptors to the reference binding wire
        ReferenceBindingProvider provider = getBindingProvider();
        if ((provider != null) && (provider instanceof EndpointReferenceProvider)) {
            ((EndpointReferenceProvider)provider).configure();
        }

        // add the policy interceptors to the service binding wire
View Full Code Here

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

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

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

            CompositeContext compositeContext = epr.getCompositeContext();
            if (compositeContext == null) {
                throw new IllegalStateException("The endpoint reference is not bound");
            }
            compositeContext.getEndpointRegistry().removeEndpointReference(epr);
            ReferenceBindingProvider bindingProvider = epr.getBindingProvider();
            if (bindingProvider != null) {
                bindingProvider.stop();
            }
            for (PolicyProvider policyProvider : epr.getPolicyProviders()) {
                policyProvider.stop();
            }
        }
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.