Examples of ServiceDiscovery


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

        }
    }

    @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

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

        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

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

        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

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

     */
    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

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

       
        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

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

        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

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

     */
    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

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

       
        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

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

        }
    }

    @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));
            }
        }
        super.configure(attributes);
    }
View Full Code Here

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

     */
    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
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.