Examples of EndpointRegistry


Examples of org.apache.tuscany.sca.runtime.EndpointRegistry

            if( domainURI.equals( endpointRegistry.getDomainURI() ) ) return endpointRegistry;
          } // end for
        } // end if
       
        // if there was no domainName to match, simply return the first EndpointRegistry...
        EndpointRegistry endpointRegistry = (EndpointRegistry) domainRegistryFactory.getEndpointRegistries().toArray()[0];
       
     
      return endpointRegistry;
    } // end method
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.EndpointRegistry

    boolean services() throws IOException {
        if (getNode() == null) {
            return true;
        }
        EndpointRegistry reg = ((NodeImpl)getNode()).getEndpointRegistry();
        for (Endpoint endpoint : reg.getEndpoints()) {
            out.println(endpoint.getComponent().getURI() + "/" + endpoint.getService().getName());
            for (Binding b : endpoint.getService().getBindings()) {
                if (!SCABinding.TYPE.equals(b.getType())) {
                    out.println("    " + b.getType().getLocalPart() + " " + b.getURI());
                }
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.EndpointRegistry

    }
   
    @Override
    public int complete(final String buffer, final int cursor, final List clist) {
        String service = TShellCompletor.lastArg;
        EndpointRegistry reg = ((NodeImpl)shell.getNode()).getEndpointRegistry();
        List<Endpoint> endpoints = reg.findEndpoint(service);
        if (endpoints.size() < 1) {
            return -1;
        }
        String serviceName = null;
        if (service.contains("/")) {
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.EndpointRegistry

   
    @Override
    public int complete(final String buffer, final int cursor, final List clist) {
        if (shell.getNode() != null) {
            List<String> services = new ArrayList<String>();
            EndpointRegistry reg = ((NodeImpl)shell.getNode()).getEndpointRegistry();
            for (Endpoint endpoint : reg.getEndpoints()) {
                services.add(endpoint.getComponent().getURI() + "/" + endpoint.getService().getName());
            }
            setCandidateStrings(services.toArray(new String[services.size()]));
        }
       return super.complete(buffer, cursor, clist);
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.EndpointRegistry

    // Get the EndpointRegistry
        DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(registry);
        if( domainRegistryFactory == null ) return null;
       
        // TODO: For the moment, just use the first (and only!) EndpointRegistry...
        EndpointRegistry endpointRegistry = (EndpointRegistry) domainRegistryFactory.getEndpointRegistries().toArray()[0];
        if( endpointRegistry == null ) return null;
       
        for( EndpointReference epReference : endpointRegistry.getEndpointReferences() ) {
          // TODO: For the present, simply return the first matching endpointReference
          if( epReference.getURI().equals(epr.getURI()) ) {
              return (RuntimeEndpointReferenceImpl) epReference;
          } // end if
        } // end for
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.EndpointRegistry

    // The following operations gives references a chance to bind to
    // services at deployment time.
   
    private void buildTimeReferenceBind(Composite domainComposite, BuilderContext context){
        // create temporary local registry for all available local endpoints
        EndpointRegistry endpointRegistry = new LocalEndpointRegistry(registry);
       
        // populate the registry with all the endpoints that are present in the model
        populateLocalRegistry(domainComposite, endpointRegistry, context);       
       
        // match all local services against the endpoint references
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.EndpointRegistry

     
      // Store the new callback EPR into the Endpoint
      this.getCallbackEndpointReferences().add(asyncEPR);
     
      // Also store the callback EPR into the EndpointRegistry
      EndpointRegistry epReg = getEndpointRegistry( registry );
      if( epReg != null ) epReg.addEndpointReference(asyncEPR);
    } // end method createAsyncServerCallback
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.EndpointRegistry

     * @param registry - the main extension point Registry
     * @return the corresponding Endpoint from the EndpointRegistry, or null if no match can be found
     */
    private RuntimeEndpointImpl findActualEP(RuntimeEndpointImpl ep,
      ExtensionPointRegistry registry) {
    EndpointRegistry endpointRegistry = getEndpointRegistry( registry );
       
        if( endpointRegistry == null ) return null;
       
        for( Endpoint endpoint : endpointRegistry.findEndpoint(ep.getURI()) ) {
          // TODO: For the present, simply return the first matching endpoint
          return (RuntimeEndpointImpl) endpoint;
        } // end for
       
    return null;
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.EndpointRegistry

        DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(registry);
       
        if( domainRegistryFactory == null ) return null;
       
        // TODO: For the moment, just use the first (and only!) EndpointRegistry...
        EndpointRegistry endpointRegistry = (EndpointRegistry) domainRegistryFactory.getEndpointRegistries().toArray()[0];
     
      return endpointRegistry;
    } // end method
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.EndpointRegistry

        EndpointReferenceBinder endpointReferenceBinder = registry.getExtensionPoint(EndpointReferenceBinder.class);
        DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(registry);
       
        // create temporary local registry for all available local endpoints
        // TODO - need a better way of getting a local registry
        EndpointRegistry registry = domainRegistryFactory.getEndpointRegistry("vm://tmp", "local");
       
        // populate the registry with all the endpoints that are currently present in the model
        populateLocalRegistry(composite, registry);
       
        // look at all the endpoint references and try to match them to
        // any local endpoints
        for (EndpointReference endpointReference : registry.getEndpointReferences()){
            endpointReferenceBinder.bindBuildTime(registry, endpointReference);
        }
       
        // remove the local registry
        domainRegistryFactory.getEndpointRegistries().remove(registry);
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.