Search in sources :

Example 6 with PluginClassLoader

use of io.apiman.common.plugin.PluginClassLoader in project apiman by apiman.

the class AbstractPluginRegistry method createPluginClassLoader.

/**
 * Creates a plugin classloader for the given plugin file.
 */
protected PluginClassLoader createPluginClassLoader(final File pluginFile) throws IOException {
    return new PluginClassLoader(pluginFile, Thread.currentThread().getContextClassLoader()) {

        @Override
        protected File createWorkDir(File pluginArtifactFile) throws IOException {
            // $NON-NLS-1$
            File workDir = new File(pluginFile.getParentFile(), ".work");
            workDir.mkdirs();
            return workDir;
        }
    };
}
Also used : File(java.io.File) PluginClassLoader(io.apiman.common.plugin.PluginClassLoader)

Aggregations

PluginClassLoader (io.apiman.common.plugin.PluginClassLoader)6 Plugin (io.apiman.common.plugin.Plugin)4 File (java.io.File)3 IOException (java.io.IOException)3 PluginCoordinates (io.apiman.common.plugin.PluginCoordinates)2 PluginSpec (io.apiman.common.plugin.PluginSpec)2 InvalidPluginException (io.apiman.manager.api.core.exceptions.InvalidPluginException)2 URL (java.net.URL)2 PolicyNotFoundException (io.apiman.gateway.engine.beans.exceptions.PolicyNotFoundException)1 NewPluginBean (io.apiman.manager.api.beans.plugins.NewPluginBean)1 PluginBean (io.apiman.manager.api.beans.plugins.PluginBean)1 PolicyDefinitionBean (io.apiman.manager.api.beans.policies.PolicyDefinitionBean)1 StorageException (io.apiman.manager.api.core.exceptions.StorageException)1 AbstractRestException (io.apiman.manager.api.rest.exceptions.AbstractRestException)1 NotAuthorizedException (io.apiman.manager.api.rest.exceptions.NotAuthorizedException)1 PluginAlreadyExistsException (io.apiman.manager.api.rest.exceptions.PluginAlreadyExistsException)1 PluginNotFoundException (io.apiman.manager.api.rest.exceptions.PluginNotFoundException)1 PluginResourceNotFoundException (io.apiman.manager.api.rest.exceptions.PluginResourceNotFoundException)1 PolicyDefinitionNotFoundException (io.apiman.manager.api.rest.exceptions.PolicyDefinitionNotFoundException)1 SystemErrorException (io.apiman.manager.api.rest.exceptions.SystemErrorException)1