org.springframework.osgi.context.support
Class DefaultContextClassLoaderProvider

java.lang.Object
  extended by org.springframework.osgi.context.support.DefaultContextClassLoaderProvider
All Implemented Interfaces:
BeanClassLoaderAware, ContextClassLoaderProvider

public class DefaultContextClassLoaderProvider
extends Object
implements ContextClassLoaderProvider, BeanClassLoaderAware

Default implementation of ContextClassLoaderProvider interface. It returns the given application context class loader if it is set, falling back to the current thread context class loader otherwise (in effect, leaving the TCCL as it is).

Author:
Costin Leau

Constructor Summary
DefaultContextClassLoaderProvider()
           
 
Method Summary
 ClassLoader getContextClassLoader()
          Returns the context class loader to be used by the OSGi application context during its life cycle events.
 void setBeanClassLoader(ClassLoader classLoader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultContextClassLoaderProvider

public DefaultContextClassLoaderProvider()
Method Detail

getContextClassLoader

public ClassLoader getContextClassLoader()
Description copied from interface: ContextClassLoaderProvider
Returns the context class loader to be used by the OSGi application context during its life cycle events.

Specified by:
getContextClassLoader in interface ContextClassLoaderProvider
Returns:
class loader used as a thread context class loader

setBeanClassLoader

public void setBeanClassLoader(ClassLoader classLoader)
Specified by:
setBeanClassLoader in interface BeanClassLoaderAware


Copyright © 2006-2011 Spring Framework. All Rights Reserved.