xmlBlaster 2.1.0 API

org.xmlBlaster.util.classloader
Class OsgiClassLoaderFactory

java.lang.Object
  extended by org.xmlBlaster.util.classloader.StandaloneClassLoaderFactory
      extended by org.xmlBlaster.util.classloader.OsgiClassLoaderFactory
All Implemented Interfaces:
ClassLoaderFactory

public class OsgiClassLoaderFactory
extends StandaloneClassLoaderFactory

Custom ClassLoaderFactory for xmlBlaster. This implementation takes care of ClassCastExceptions in the default StandaloneClassLoaderFactory. It assumes that the current classloader is an instance of URLClassLoader but it can be an EclipseClassLoader or something else. If the default implemenation fails a new delegating URLCLassLoader will be returned to the callers. To use this implementation set xmlBlaster property urlClassLoaderFactory.

Author:
Kai Klesatschke
See Also:
Global.getClassLoaderFactory(), StandaloneClassLoaderFactory

Field Summary
 
Fields inherited from class org.xmlBlaster.util.classloader.StandaloneClassLoaderFactory
ME
 
Constructor Summary
OsgiClassLoaderFactory()
           
 
Method Summary
 java.net.URLClassLoader getPluginClassLoader(PluginInfo pluginInfo)
          Creates and returns a new URL class loader based on the callers class loader and the callers related additional classes which may exist in a specified path.
 java.net.URLClassLoader getXmlBlasterClassLoader()
          Creates and returns a new URL class loader based on the callers class loader and the callers related additional classes which may exist in a specified path.
 
Methods inherited from class org.xmlBlaster.util.classloader.StandaloneClassLoaderFactory
directoryForWrite, getDirectoryForWrite, getLoaderInfo, init, which
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OsgiClassLoaderFactory

public OsgiClassLoaderFactory()
Method Detail

getPluginClassLoader

public java.net.URLClassLoader getPluginClassLoader(PluginInfo pluginInfo)
                                             throws XmlBlasterException
Description copied from class: StandaloneClassLoaderFactory
Creates and returns a new URL class loader based on the callers class loader and the callers related additional classes which may exist in a specified path.

Specified by:
getPluginClassLoader in interface ClassLoaderFactory
Overrides:
getPluginClassLoader in class StandaloneClassLoaderFactory
Throws:
XmlBlasterException

getXmlBlasterClassLoader

public java.net.URLClassLoader getXmlBlasterClassLoader()
                                                 throws XmlBlasterException
Description copied from class: StandaloneClassLoaderFactory
Creates and returns a new URL class loader based on the callers class loader and the callers related additional classes which may exist in a specified path.

Specified by:
getXmlBlasterClassLoader in interface ClassLoaderFactory
Overrides:
getXmlBlasterClassLoader in class StandaloneClassLoaderFactory
Throws:
XmlBlasterException

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.