Package org.apache.tuscany.sca.assembly

Examples of org.apache.tuscany.sca.assembly.OptimizableBinding


                                        break;
                                    }
                                }
                            }
                        }
                        OptimizableBinding optimizableBinding = (OptimizableBinding)binding;
                        optimizableBinding.setTargetComponent(targetComponet);
                        optimizableBinding.setTargetComponentService(targetService);
                        if (targetService != null) {
                            for (Binding serviceBinding : targetService.getBindings()) {
                                if (serviceBinding.getClass() == binding.getClass()) {
                                    optimizableBinding.setTargetBinding(serviceBinding);
                                    break;
                                }
                            }
                        }
                    }
View Full Code Here


    public boolean isTargetRemote() {
        boolean targetIsRemote = false;

        // first look at the target service and see if this has been resolved
        OptimizableBinding optimizableBinding = (OptimizableBinding)binding;

        // The decision is based on the results of the wiring process in the assembly model
        // The SCA binding is used to represent unresolved reference targets, i.e. those
        // reference targets that need resolving at run time. We can tell by lookin if the
        // service to which this binding refers is resolved or not.
        //
        // TODO - When a callback is in operation. A callback reference bindings sometimes has to
        //        act as though there is a local wire and sometimes as if there is a remote wire
        //        what are the implications of this here?

        if (RemoteBindingHelper.isTargetRemote()) {
            if (reference.getInterfaceContract() != null) {
                targetIsRemote = reference.getInterfaceContract().getInterface().isRemotable();
            } else {
                targetIsRemote = true;
            }
        } else if (optimizableBinding.getTargetComponentService() != null) {
            if (optimizableBinding.getTargetComponentService().isUnresolved() == true) {
                targetIsRemote = true;
            } else {
                targetIsRemote = false;
            }
        } else {
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.assembly.OptimizableBinding

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.