org.rhq.core.pc.plugin
Class FileSystemPluginFinder

java.lang.Object
  extended by org.rhq.core.pc.plugin.FileSystemPluginFinder
All Implemented Interfaces:
PluginFinder

public class FileSystemPluginFinder
extends Object
implements PluginFinder

Finds all JAR files located in a set of plugin directories. This does not load in any plugin jars nor does it parse any plugin descriptors. This merely looks for jar files in its plugin directories and reports where it finds them.

Author:
Jason Dobies, John Mazzitelli

Constructor Summary
FileSystemPluginFinder(Collection<File> pluginDirs)
          Creates a new FileSystemPluginFinder object.
FileSystemPluginFinder(File pluginDir)
          Creates a new FileSystemPluginFinder object.
 
Method Summary
 Collection<URL> findPlugins()
          Searches all the plugin directories (as defined by the argument passed to this object's constructor) and will load in all plugins it finds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSystemPluginFinder

public FileSystemPluginFinder(File pluginDir)
Creates a new FileSystemPluginFinder object.

Parameters:
pluginDir - an initial directory where this object will look for plugins

FileSystemPluginFinder

public FileSystemPluginFinder(Collection<File> pluginDirs)
Creates a new FileSystemPluginFinder object.

Parameters:
pluginDirs - an initial set of directories where this object will look for plugins
Method Detail

findPlugins

public Collection<URL> findPlugins()
Searches all the plugin directories (as defined by the argument passed to this object's constructor) and will load in all plugins it finds.

Specified by:
findPlugins in interface PluginFinder
Returns:
a set of URLs that point to all the plugins that were loaded.


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.