Package org.apache.tuscany.sca.distributed.management

Examples of org.apache.tuscany.sca.distributed.management.ServiceDiscovery


    public EndpointReference getServiceEndpoint(){
       
        if ( serviceEPR == null ){
            // try to resolve the service endpoint with the registry
            DistributedSCADomain distributedDomain = ((SCABindingImpl)binding).getDistributedDomain();
            ServiceDiscovery serviceDiscovery = distributedDomain.getServiceDiscovery();
           
            // The binding URI might be null in the case where this reference is completely
            // dynamic, for example, in the case of callbacks
            if (binding.getURI() != null) {
                String serviceUrl = serviceDiscovery.findServiceEndpoint(distributedDomain.getDomainName(),
                                                                         binding.getURI(),
                                                                         SCABinding.class.getName());
               
                if ( (serviceUrl != null ) &&
                     (!serviceUrl.equals(""))){
View Full Code Here


       
        // get the url out of the binding and send it to the registry if
        // a distributed domain is configured
        DistributedSCADomain distributedDomain = ((SCABindingImpl)this.binding).getDistributedDomain();
       
        ServiceDiscovery serviceDiscovery = distributedDomain.getServiceDiscovery();
       
        // register endpoint against the path element of the binding uri
        String componentName = this.binding.getURI();
       
        try {
            URI servicePath = new URI(this.binding.getURI());
            componentName = servicePath.getPath();
           
            // strinp any leading slash
            if (componentName.charAt(0) == '/'){
                componentName = componentName.substring(1, componentName.length());
            }
        } catch(Exception ex) {
            // do nothing, the binding uri string will be used
        }


        serviceDiscovery.registerServiceEndpoint(distributedDomain.getDomainName(),
                                                 distributedDomain.getNodeName(),
                                                 componentName,
                                                 SCABinding.class.getName(),
                                                 wsBinding.getURI());
View Full Code Here

            // reference, e.g. a callback, so check the domain to see if the service is available
            // at this node. The binding uri might be null here if the dynamic reference has been
            // fully configured yet. It won't have all of the information until invocation time
            if ((distributedDomain != null) &&
                (binding.getURI() != null) ) {
                ServiceDiscovery serviceDiscovery = distributedDomain.getServiceDiscovery();
               
                String serviceUrl = serviceDiscovery.findServiceEndpoint(distributedDomain.getDomainName(),
                                                                         binding.getURI(),
                                                                         SCABinding.class.getName());
                if (serviceUrl == null) {
                    targetIsRemote = false;
                } else {
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.distributed.management.ServiceDiscovery

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.