org.apache.tuscany.sca.extensibility.osgi
Class OSGiServiceDiscoverer.ClassLoaderImpl

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by org.apache.tuscany.sca.extensibility.osgi.OSGiServiceDiscoverer.ClassLoaderImpl
Enclosing class:
OSGiServiceDiscoverer

public class OSGiServiceDiscoverer.ClassLoaderImpl
extends java.security.SecureClassLoader

This class loader provides resource access to META-INF/services/... which is used by many frameworks. OSGi Import-Package and DynmaicImport-Package headers do not support split packages. Another option is to use Require-Bundle header. We can collect the list of bundles and add them as required bundles to a special gateway bundle.


Constructor Summary
OSGiServiceDiscoverer.ClassLoaderImpl()
           
 
Method Summary
protected  java.net.URL findResource(java.lang.String name)
          Open a back-door to expose the META-INF/services resources
protected  java.util.Enumeration<java.net.URL> findResources(java.lang.String name)
          Open a back-door to expose the META-INF/services resources
 
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass, getPermissions
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, 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

OSGiServiceDiscoverer.ClassLoaderImpl

public OSGiServiceDiscoverer.ClassLoaderImpl()
Method Detail

findResource

protected java.net.URL findResource(java.lang.String name)
Open a back-door to expose the META-INF/services resources

Overrides:
findResource in class java.lang.ClassLoader

findResources

protected java.util.Enumeration<java.net.URL> findResources(java.lang.String name)
                                                     throws java.io.IOException
Open a back-door to expose the META-INF/services resources

Overrides:
findResources in class java.lang.ClassLoader
Throws:
java.io.IOException