Package org.apache.tuscany.sca.extensibility

Examples of org.apache.tuscany.sca.extensibility.ServiceDiscovery$ServiceComparator


        }
    }

    @Override
    public void configure(Map<String, Map<String, String>> attributes) {
        ServiceDiscovery discovery = getExtensionPointRegistry().getServiceDiscovery();
        for (Map.Entry<String, Map<String, String>> e : attributes.entrySet()) {
            discovery.setAttribute(e.getKey(), e.getValue());
        }
        for (Object o : properties.keySet()) {
            String p = (String) o;
            if (p.indexOf('.') > -1) {
                String serviceType = p.substring(0, p.lastIndexOf('.'));
                String attribute = p.substring(p.lastIndexOf('.')+1);
                discovery.setAttribute(serviceType, attribute, properties.getProperty(p));
            }
        }
        quietLogging = Boolean.parseBoolean(properties.getProperty(RuntimeProperties.QUIET_LOGGING));
        super.configure(attributes);
    }
View Full Code Here


        UtilityExtensionPoint utils = registry.getExtensionPoint(UtilityExtensionPoint.class);
        InterfaceContractMapper mapper = utils.getUtility(InterfaceContractMapper.class);

        // Get the provider factory service declarations
        Collection<ServiceDeclaration> builderDeclarations;
        ServiceDiscovery serviceDiscovery = registry.getServiceDiscovery();
        try {
            builderDeclarations = serviceDiscovery.getServiceDeclarations(CompositeBuilder.class.getName());
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }

        for (ServiceDeclaration builderDeclaration : builderDeclarations) {
            Map<String, String> attributes = builderDeclaration.getAttributes();
            String id = attributes.get("id");

            CompositeBuilder builder = new LazyCompositeBuilder(id, builderDeclaration, this, factories, mapper);
            builders.put(id, builder);
        }

        try {
            builderDeclarations = serviceDiscovery.getServiceDeclarations(BindingBuilder.class);
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }

        for (ServiceDeclaration builderDeclaration : builderDeclarations) {
            BindingBuilder<?> builder = new LazyBindingBuilder(builderDeclaration);
            bindingBuilders.put(builder.getBindingType(), builder);
        }

        try {
            builderDeclarations = serviceDiscovery.getServiceDeclarations(ImplementationBuilder.class);
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }

        for (ServiceDeclaration builderDeclaration : builderDeclarations) {
            ImplementationBuilder<?> builder = new LazyImplementationBuilder(builderDeclaration);
            implementationBuilders.put(builder.getImplementationType(), builder);
        }
       
        try {
            builderDeclarations = serviceDiscovery.getServiceDeclarations(PolicyBuilder.class);
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }

        for (ServiceDeclaration builderDeclaration : builderDeclarations) {
            PolicyBuilder<?> builder = new LazyPolicyBuilder(builderDeclaration);
            policyBuilders.put(builder.getPolicyType(), builder);
        }
       
        try {
            builderDeclarations = serviceDiscovery.getServiceDeclarations(ContractBuilder.class);
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }
       
        for (ServiceDeclaration builderDeclaration : builderDeclarations) {
View Full Code Here

     */
    private List<ProviderFactory> loadProviderFactories(Class<?> factoryClass) {

        // Get the provider factory service declarations
        Set<ServiceDeclaration> factoryDeclarations;
        ServiceDiscovery serviceDiscovery = ServiceDiscovery.getInstance();
        try {
            factoryDeclarations = serviceDiscovery.getServiceDeclarations(factoryClass);
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }

        // Get the target extension point
View Full Code Here

        }
    }

    @Override
    public void configure(Map<String, Map<String, String>> attributes) {
        ServiceDiscovery discovery = getExtensionPointRegistry().getServiceDiscovery();
        for (Map.Entry<String, Map<String, String>> e : attributes.entrySet()) {
            discovery.setAttribute(e.getKey(), e.getValue());
        }
        for (Object o : properties.keySet()) {
            String p = (String) o;
            if (p.indexOf('.') > -1) {
                String serviceType = p.substring(0, p.lastIndexOf('.'));
                String attribute = p.substring(p.lastIndexOf('.')+1);
                discovery.setAttribute(serviceType, attribute, properties.getProperty(p));
            }
        }
        quietLogging = Boolean.parseBoolean(properties.getProperty(RuntimeProperties.QUIET_LOGGING));
        super.configure(attributes);
    }
View Full Code Here

        UtilityExtensionPoint utils = registry.getExtensionPoint(UtilityExtensionPoint.class);
        InterfaceContractMapper mapper = utils.getUtility(InterfaceContractMapper.class);
       
        // Get the provider factory service declarations
        Set<ServiceDeclaration> builderDeclarations;
        ServiceDiscovery serviceDiscovery = ServiceDiscovery.getInstance();
        try {
            builderDeclarations = serviceDiscovery.getServiceDeclarations(CompositeBuilder.class.getName());
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }

        for (ServiceDeclaration builderDeclaration : builderDeclarations) {
View Full Code Here

        if (loaded)
            return;

        // Get the provider factory service declarations
        Set<ServiceDeclaration> factoryDeclarations;
        ServiceDiscovery serviceDiscovery = ServiceDiscovery.getInstance();
        try {
            factoryDeclarations = serviceDiscovery.getServiceDeclarations(EndpointResolverFactory.class.getName());
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }

        // Get the extension point
View Full Code Here

     */
    private List<ProviderFactory> loadProviderFactories(Class<?> factoryClass) {

        // Get the provider factory service declarations
        Set<ServiceDeclaration> factoryDeclarations;
        ServiceDiscovery serviceDiscovery = ServiceDiscovery.getInstance();
        try {
            factoryDeclarations = serviceDiscovery.getServiceDeclarations(factoryClass.getName());
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }

        // Get the target extension point
View Full Code Here

       
        FactoryExtensionPoint factories = registry.getExtensionPoint(FactoryExtensionPoint.class);
       
        // Get the provider factory service declarations
        Set<ServiceDeclaration> builderDeclarations;
        ServiceDiscovery serviceDiscovery = ServiceDiscovery.getInstance();
        try {
            builderDeclarations = serviceDiscovery.getServiceDeclarations(ContributionBuilder.class.getName());
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }

        for (ServiceDeclaration builderDeclaration : builderDeclarations) {
View Full Code Here

        UtilityExtensionPoint utils = registry.getExtensionPoint(UtilityExtensionPoint.class);
        InterfaceContractMapper mapper = utils.getUtility(InterfaceContractMapper.class);
       
        // Get the provider factory service declarations
        Set<ServiceDeclaration> builderDeclarations;
        ServiceDiscovery serviceDiscovery = ServiceDiscovery.getInstance();
        try {
            builderDeclarations = serviceDiscovery.getServiceDeclarations(CompositeBuilder.class.getName());
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }

        for (ServiceDeclaration builderDeclaration : builderDeclarations) {
View Full Code Here

     */
    private List<ProviderFactory> loadProviderFactories(Class<?> factoryClass) {

        // Get the provider factory service declarations
        Set<ServiceDeclaration> factoryDeclarations;
        ServiceDiscovery serviceDiscovery = ServiceDiscovery.getInstance();
        try {
            factoryDeclarations = serviceDiscovery.getServiceDeclarations(factoryClass.getName());
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }

        // Get the target extension point
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.extensibility.ServiceDiscovery$ServiceComparator

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.