net.sf.hermesftp
Class PluginManager

java.lang.Object
  extended by net.sf.hermesftp.PluginManager

public final class PluginManager
extends java.lang.Object

Utility class that manages the plug-in classpath and class loading.

Author:
Lars Behnke.

Method Summary
static void addResource(java.io.File jarOrPath)
          Adds a resource to the classpath.
static java.io.File getPluginDir()
          Get the directory where plugins are installed.
static void startApplication(java.lang.String mainClassName, java.lang.String startMethod, java.lang.String[] args)
          Need to be invoked from the application's main in order to utilize the dynamic class loader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addResource

public static void addResource(java.io.File jarOrPath)
Adds a resource to the classpath. Note that the resource is not available before the update method of the classloader is called.

Parameters:
jarOrPath - The resource to add.

getPluginDir

public static java.io.File getPluginDir()
Get the directory where plugins are installed.

Returns:
the directory where plugins are installed.

startApplication

public static void startApplication(java.lang.String mainClassName,
                                    java.lang.String startMethod,
                                    java.lang.String[] args)
Need to be invoked from the application's main in order to utilize the dynamic class loader.

Parameters:
mainClassName - Main class.
startMethod - Start method that accepts the main arguments.
args - Array of optional arguments


Copyright © 2005-2007 Lars Behnke. All Rights Reserved.