Package com.dtolabs.rundeck.core.execution.service

Examples of com.dtolabs.rundeck.core.execution.service.MissingProviderException


                }
            });
            fail("Should have thrown exception");
        } catch (ExecutionServiceException e) {
            assertTrue(e instanceof MissingProviderException);
            MissingProviderException mis = (MissingProviderException) e;
//            assertEquals(ServiceNameConstants.WorkflowNodeStep, mis.getServiceName());
            assertEquals("blah", mis.getProviderName());
        }
        //test null provider name
        try {
            service.getExecutorForExecutionItem(new NodeStepExecutionItem() {
                public String getType() {
View Full Code Here


    public T providerOfType(final String providerName) throws ExecutionServiceException {
        final ServiceProviderLoader pluginManager = getPluginManager();
        if (null != pluginManager) {
            return pluginManager.loadProvider(this, providerName);
        } else {
            throw new MissingProviderException("Provider not found", getName(), providerName);
        }
    }
View Full Code Here

public abstract class ChainedProviderService<T> implements ProviderService<T> {

    @Override
    public T providerOfType(final String providerName) throws ExecutionServiceException {
        T t = null;
        MissingProviderException caught = null;
        for (final ProviderService<T> service : getServiceList()) {
            try {
                t = service.providerOfType(providerName);
            } catch (MissingProviderException e) {
                //ignore and attempt to load from the secondary service
                caught = e;
            }
            if (null != t) {
                return t;
            }

        }
        if (null != caught) {
            throw caught;
        } else {
            throw new MissingProviderException("Provider not found", getName(), providerName);
        }
    }
View Full Code Here


    @Override
    public T providerOfType(final String providerName) throws ExecutionServiceException {
        T t = null;
        MissingProviderException caught = null;
        try {
            t = super.providerOfType(providerName);
        } catch (MissingProviderException e) {
            //ignore and attempt to load from the plugin manager
            caught = e;
        }
        if (null != t) {
            return t;
        }
        final ServiceProviderLoader pluginManager = framework.getPluginManager();
        if (null != pluginManager) {
            return pluginManager.loadProvider(this, providerName);
        } else if (null != caught) {
            throw caught;
        }else {
            throw new MissingProviderException("Provider not found", getName(), providerName);
        }
    }
View Full Code Here

        return new ArrayList<ProviderIdent>(providers);
    }

    private T createProviderInstanceOfType(final String providerName) throws ExecutionServiceException {
        if (null == registry.get(providerName)) {
            throw new MissingProviderException("Not found", getName(),
                providerName);
        }
        final Class<? extends T> execClass = registry.get(providerName);
        return createProviderInstanceFromType(execClass, providerName);
    }
View Full Code Here

    public synchronized <T> T loadProvider(final PluggableService<T> service, final String providerName) throws ProviderLoaderException {
        final ProviderIdent ident = new ProviderIdent(service.getName(), providerName);
        final ProviderLoader loaderForIdent = cache.getLoaderForIdent(ident);
        if (null == loaderForIdent) {
            throw new MissingProviderException("No matching plugin found", service.getName(), providerName);
        }
        final T load = loaderForIdent.load(service, providerName);
        if (null != load) {
            return load;
        } else {
View Full Code Here

TOP

Related Classes of com.dtolabs.rundeck.core.execution.service.MissingProviderException

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.