Skip navigation links
org.jivesoftware.spark.plugin

Class PluginClassLoader

    • Constructor Summary

      Constructors 
      Constructor and Description
      PluginClassLoader(java.lang.ClassLoader parent, java.io.File libDir)
      Constructs the classloader.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addPlugin(java.io.File pluginDir)
      Adds all archives in a plugin to the classpath.
      • Methods inherited from class java.net.URLClassLoader

        addURL, close, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstance
      • Methods inherited from class java.security.SecureClassLoader

        defineClass, defineClass
      • Methods inherited from class java.lang.ClassLoader

        clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PluginClassLoader

        public PluginClassLoader(java.lang.ClassLoader parent,
                                 java.io.File libDir)
                          throws java.net.MalformedURLException
        Constructs the classloader.
        Parameters:
        parent - the parent class loader (or null for none).
        libDir - the directory to load jar files from.
        Throws:
        java.net.MalformedURLException - if the libDir path is not valid.
    • Method Detail

      • addPlugin

        public void addPlugin(java.io.File pluginDir)
                       throws java.net.MalformedURLException
        Adds all archives in a plugin to the classpath.
        Parameters:
        pluginDir - the directory of the plugin.
        Throws:
        java.net.MalformedURLException - the exception thrown if URL is not valid.