Examples of ReferenceBindingProvider


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

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

        }
       
        // TUSCANY-3783
        // if the reference is an async reference and the binding doesn't support
        // async natively fluff up the response service/endpoint
        ReferenceBindingProvider referenceBindingProvider = ((RuntimeEndpointReference)endpointReference).getBindingProvider();
        if ( referenceBindingProvider instanceof EndpointReferenceAsyncProvider &&
             !((EndpointReferenceAsyncProvider)referenceBindingProvider).supportsNativeAsync() &&
             endpointReference.isAsyncInvocation() &&
             endpointReference.getCallbackEndpoint() == null) {
            ((RuntimeEndpointReference)endpointReference).createAsyncCallbackEndpoint();
View Full Code Here

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

                epr.getStatus() == EndpointReference.Status.RESOLVED_BINDING){
               
                // As we only care about starting references at build time in the
                // async case at the moment check that the binding supports native async
                // and that the reference is an async reference
                ReferenceBindingProvider bindingProvider = epr.getBindingProvider();
                if (bindingProvider instanceof EndpointReferenceAsyncProvider &&
                    ((EndpointReferenceAsyncProvider)bindingProvider).supportsNativeAsync() &&
                    epr.isAsyncInvocation()){
                    // it's resolved so start it now
                    try {
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) {
                try {
                    bindingProvider.stop();
                } catch (Throwable ex){
                    Monitor.error(monitor, this, "core-messages", "StopException", ex);
               
            }
            for (PolicyProvider policyProvider : epr.getPolicyProviders()) {
View Full Code Here

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

            return null;
        RuntimeEndpointReference epr = (RuntimeEndpointReference)source;
        if (!isAsyncInvocation(epr)) return null;
       
        // Check to see if the binding supports async invocation natively
        ReferenceBindingProvider eprProvider = epr.getBindingProvider();
        if( eprProvider instanceof EndpointReferenceAsyncProvider) {
          if( ((EndpointReferenceAsyncProvider)eprProvider).supportsNativeAsync() ) return null;
        } // end if
       
        RuntimeEndpoint endpoint;
View Full Code Here

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

            return false;
        RuntimeEndpointReference epr = (RuntimeEndpointReference)source;
       
        // TODO - need to update this once BindingProvider interface is refactored to contain
        // supportsNativeAsync directly...
        ReferenceBindingProvider provider = epr.getBindingProvider();
        if( provider instanceof EndpointReferenceAsyncProvider ) {
          return ((EndpointReferenceAsyncProvider)provider).supportsNativeAsync();
        } else {
          return false;
        } // end if
View Full Code Here

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

           
            // add a binding provider into the reference for the resolved binding
            compositeActivator.addReferenceBindingProviderForEndpoint(endpoint);
           
            // extract the binding provider that has been created
            ReferenceBindingProvider bindingProvider = runtimeRef.getBindingProvider(endpoint.getSourceBinding());
           
            // start the binding provider 
            bindingProvider.start();
           
            // create the wire
            compositeActivator.addReferenceWireForEndpoint(endpoint);
           
            // extract the wire that has been created
View Full Code Here

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

    private void initReferenceBindingInvocationChains() {
        RuntimeComponentReference reference = (RuntimeComponentReference)wireSource.getContract();
        Binding referenceBinding = wireSource.getBinding();
       
        // add the binding interceptors to the reference binding wire
        ReferenceBindingProvider provider = reference.getBindingProvider(referenceBinding);
        if ((provider != null) &&
            (provider instanceof ReferenceBindingProviderRRB)){
            ((ReferenceBindingProviderRRB)provider).configureBindingChain(this);
        }
       
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
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.