Examples of GFacProviderConfig


Examples of org.apache.airavata.gfac.core.provider.GFacProviderConfig

        } catch (SAXException e) {
            throw new GFacException(e);
        } catch (IOException e) {
            throw new GFacException(e);
        }
        GFacProviderConfig s = null;
        GFacProvider provider = null;
        List<GFacProviderConfig> aClass = null;
        String providerClassName = null;
        try {
            aClass = GFacConfiguration.getProviderConfig(handlerDoc,
                    Constants.XPATH_EXPR_APPLICATION_HANDLERS_START + applicationName + "']", Constants.GFAC_CONFIG_APPLICATION_NAME_ATTRIBUTE);
            // This should be have a single element only.
            if (aClass != null && !aClass.isEmpty()) {
                s = aClass.get(0);
                Class<? extends GFacProvider> aClass1 = Class.forName(s.getClassName()).asSubclass(GFacProvider.class);
                provider = aClass1.newInstance();
                //loading the provider properties
                if(!aClass.isEmpty()){
                    provider.initProperties(aClass.get(0).getProperties());
                }
View Full Code Here

Examples of org.apache.airavata.gfac.core.provider.GFacProviderConfig

        } catch (SAXException e) {
            throw new GFacException(e);
        } catch (IOException e) {
            throw new GFacException(e);
        }
        GFacProviderConfig s = null;
        String executionMode = "sync";
        try {
            executionMode = GFacConfiguration.getAttributeValue(handlerDoc,
                    Constants.XPATH_EXPR_APPLICATION_HANDLERS_START + applicationName + "']", Constants.GFAC_CONFIG_EXECUTION_MODE_ATTRIBUTE);
            // This should be have a single element only.
View Full Code Here

Examples of org.apache.airavata.gfac.core.provider.GFacProviderConfig

                    String name = ((Element) childNodes.item(j)).getAttribute(Constants.NAME);
                    String value = ((Element) childNodes.item(j)).getAttribute(Constants.VALUE);
                    properties.put(name, value);
                }
            }
            GFacProviderConfig gFacProviderConfig = new GFacProviderConfig(properties,className);
            gFacProviderConfigs.add(gFacProviderConfig);
        }
        return gFacProviderConfigs;
    }
View Full Code Here

Examples of org.apache.airavata.gfac.provider.GFacProviderConfig

                    String name = ((Element) childNodes.item(j)).getAttribute(Constants.NAME);
                    String value = ((Element) childNodes.item(j)).getAttribute(Constants.VALUE);
                    properties.put(name, value);
                }
            }
            GFacProviderConfig gFacProviderConfig = new GFacProviderConfig(properties,className);
            gFacProviderConfigs.add(gFacProviderConfig);
        }
        return gFacProviderConfigs;
    }
View Full Code Here

Examples of org.apache.airavata.gfac.provider.GFacProviderConfig

     * @return GFacProvider instance.
     */
    private static GFacProvider getProvider(JobExecutionContext jobExecutionContext) throws GFacException {
        HostDescription hostDescription = jobExecutionContext.getApplicationContext().getHostDescription();
        String applicationName = jobExecutionContext.getServiceName();
        GFacProviderConfig s = null;
        GFacProvider provider = null;
        List<GFacProviderConfig> aClass = null;
        String providerClassName = null;
        try {
            aClass = GFacConfiguration.getProviderConfig(GFacConfiguration.getHandlerDoc(),
                    Constants.XPATH_EXPR_APPLICATION_HANDLERS_START + applicationName + "']", Constants.GFAC_CONFIG_APPLICATION_NAME_ATTRIBUTE);
            // This should be have a single element only.
            if (aClass != null && !aClass.isEmpty()) {
                s = aClass.get(0);
                Class<? extends GFacProvider> aClass1 = Class.forName(s.getClassName()).asSubclass(GFacProvider.class);
                provider = aClass1.newInstance();
                //loading the provider properties
                if(!aClass.isEmpty()){
                    provider.initProperties(aClass.get(0).getProperties());
                }
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.