|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.ClassLoader
org.jruby.embed.osgi.internal.JRubyOSGiBundleClassLoader
public class JRubyOSGiBundleClassLoader
Closest thing to JRubyClassLoader's addURL but for OSGi bundles. Used as the parent classloader the usual jruby's bundle's classloader.
Constructor Summary | |
---|---|
JRubyOSGiBundleClassLoader()
|
|
JRubyOSGiBundleClassLoader(org.osgi.framework.Bundle creator)
|
Method Summary | |
---|---|
boolean |
addBundle(org.osgi.framework.Bundle bundle)
|
void |
addBundle(java.lang.Class<?> classInOsgiBundle)
|
protected java.lang.Class<?> |
findClass(java.lang.String name)
|
org.osgi.framework.Bundle |
getBundle()
Returns the Bundle that defined this web-application. |
java.net.URL |
getResource(java.lang.String name)
|
java.util.Enumeration<java.net.URL> |
getResources(java.lang.String name)
TODO: optimize: we should not have to look for the resources everywhere until called for it. |
boolean |
removeBundle(org.osgi.framework.Bundle bundle)
|
Methods inherited from class java.lang.ClassLoader |
---|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResourceAsStream, 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 |
---|
public JRubyOSGiBundleClassLoader()
-
java.io.IOException
public JRubyOSGiBundleClassLoader(org.osgi.framework.Bundle creator)
-
java.io.IOException
Method Detail |
---|
public void addBundle(java.lang.Class<?> classInOsgiBundle)
-
java.io.IOException
public boolean addBundle(org.osgi.framework.Bundle bundle)
parent
- The parent classloader. In this case jrubyLoadercontext
- The WebAppContextcontributor
- The bundle that defines this web-application.
java.io.IOException
public boolean removeBundle(org.osgi.framework.Bundle bundle) throws java.io.IOException
parent
- The parent classloader. In this case jrubyLoadercontext
- The WebAppContextcontributor
- The bundle that defines this web-application.
java.io.IOException
public org.osgi.framework.Bundle getBundle()
Bundle
that defined this web-application.
getBundle
in interface org.osgi.framework.BundleReference
Bundle
object associated with this
BundleReference
.public java.util.Enumeration<java.net.URL> getResources(java.lang.String name) throws java.io.IOException
getResources
in class java.lang.ClassLoader
java.io.IOException
public java.net.URL getResource(java.lang.String name)
getResource
in class java.lang.ClassLoader
protected java.lang.Class<?> findClass(java.lang.String name) throws java.lang.ClassNotFoundException
findClass
in class java.lang.ClassLoader
java.lang.ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |