public class DefaultPluginRegistry extends Object implements IPluginRegistry
| Constructor and Description |
|---|
DefaultPluginRegistry()
Constructor.
|
DefaultPluginRegistry(File pluginsDir)
Constructor.
|
DefaultPluginRegistry(File pluginsDir,
Set<URL> pluginRepositories)
Constructor.
|
DefaultPluginRegistry(Map<String,String> configMap)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected io.apiman.common.plugin.PluginClassLoader |
createPluginClassLoader(File pluginFile)
Creates a plugin classloader for the given plugin file.
|
protected void |
downloadArtifactTo(URL artifactUrl,
File pluginFile,
IAsyncResultHandler<File> handler)
Download the artifact at the given URL and store it locally into the given
plugin file path.
|
protected void |
downloadFromMavenRepo(io.apiman.common.plugin.PluginCoordinates coordinates,
URL mavenRepoUrl,
IAsyncResultHandler<File> handler)
Tries to download the plugin from the given remote maven repository.
|
protected void |
downloadPlugin(io.apiman.common.plugin.PluginCoordinates coordinates,
IAsyncResultHandler<File> handler)
Downloads the plugin via its maven GAV information.
|
Future<IAsyncResult<io.apiman.common.plugin.Plugin>> |
loadPlugin(io.apiman.common.plugin.PluginCoordinates coordinates,
IAsyncResultHandler<io.apiman.common.plugin.Plugin> userHandler)
Asynchronously loads a plugin.
|
protected io.apiman.common.plugin.Plugin |
readPluginFile(io.apiman.common.plugin.PluginCoordinates coordinates,
File pluginFile)
Reads the plugin into an object.
|
public DefaultPluginRegistry()
public DefaultPluginRegistry(Map<String,String> configMap)
configMap - the configuration mappublic DefaultPluginRegistry(File pluginsDir)
pluginsDir - the plugins directorypublic Future<IAsyncResult<io.apiman.common.plugin.Plugin>> loadPlugin(io.apiman.common.plugin.PluginCoordinates coordinates, IAsyncResultHandler<io.apiman.common.plugin.Plugin> userHandler)
IPluginRegistryloadPlugin in interface IPluginRegistrycoordinates - the coordinatesuserHandler - result handlerIPluginRegistry.loadPlugin(io.apiman.common.plugin.PluginCoordinates, io.apiman.gateway.engine.async.IAsyncResultHandler)protected io.apiman.common.plugin.Plugin readPluginFile(io.apiman.common.plugin.PluginCoordinates coordinates,
File pluginFile)
throws Exception
coordinates - pluginFile - Exceptionprotected io.apiman.common.plugin.PluginClassLoader createPluginClassLoader(File pluginFile) throws IOException
pluginFile - IOExceptionprotected void downloadPlugin(io.apiman.common.plugin.PluginCoordinates coordinates,
IAsyncResultHandler<File> handler)
coordinates - handler - protected void downloadFromMavenRepo(io.apiman.common.plugin.PluginCoordinates coordinates,
URL mavenRepoUrl,
IAsyncResultHandler<File> handler)
coordinates - mavenRepoUrl - handler - protected void downloadArtifactTo(URL artifactUrl, File pluginFile, IAsyncResultHandler<File> handler)
artifactUrl - pluginFile - handler - Copyright © 2015 JBoss, a division of Red Hat. All rights reserved.