Top Description Inners Constructors Methods
org.jruby.embed.osgi

public Class OSGiIsolatedScriptingContainer

extends IsolatedScriptingContainer
Class Inheritance
Imports
java.io.IOException, java.net.URL, java.util.Enumeration, org.jruby.embed.IsolatedScriptingContainer, .LocalContextScope, .LocalVariableBehavior, org.jruby.embed.osgi.internal.BundleWiringOSGiClassLoaderAdapter, org.jruby.util.Loader, org.osgi.framework.Bundle, .BundleContext, .FrameworkUtil

adds some helper methods to add Bundle to the LOAD_PATH or GEM_PATH using the IsolatedScriptingContainer as base. new URL( uri ).openStream(), i.e. new URL(classloader.getResource().toString()).openStream() has to work for those classloaders. felix, knoplerfish and equinox OSGi framework do work.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Constructor Summary

AccessConstructor and Description
public
public
public
public
public

Method Summary

Modifier and TypeMethod and Description
public void
addBundle(String symbolicName)

add the classloader from the given bundle to the LOAD_PATH and the GEM_PATH using the bundle symbolic name

public void
addBundle(Bundle bundle)

add the classloader from the given bundle to the LOAD_PATH and the GEM_PATH

public void
addBundleToGemPath(Bundle bundle)
Deprecated

add the classloader from the given bundle to the GEM_PATH

public void
addBundleToGemPath(String symbolicName)
Deprecated

add the classloader from the given bundle to the GEM_PATH using the bundle symbolic name

public void
addBundleToLoadPath(Bundle bundle)
Deprecated

add the classloader from the given bundle to the LOAD_PATH

public void
addBundleToLoadPath(String symbolicName)
Deprecated

add the classloader from the given bundle to the LOAD_PATH using the bundle symbolic name

private String
createUri(Bundle cl, String ref)
Deprecated

private Bundle
toBundle(String symbolicName)

Inherited from org.jruby.embed.IsolatedScriptingContainer:
setEnvironment

Constructor Detail

OSGiIsolatedScriptingContainerback to summary
public OSGiIsolatedScriptingContainer()
OSGiIsolatedScriptingContainerback to summary
public OSGiIsolatedScriptingContainer(LocalContextScope scope, LocalVariableBehavior behavior)
OSGiIsolatedScriptingContainerback to summary
public OSGiIsolatedScriptingContainer(LocalContextScope scope)
OSGiIsolatedScriptingContainerback to summary
public OSGiIsolatedScriptingContainer(LocalVariableBehavior behavior)
OSGiIsolatedScriptingContainerback to summary
public OSGiIsolatedScriptingContainer(LocalContextScope scope, LocalVariableBehavior behavior, boolean lazy)

Method Detail

addBundleback to summary
public void addBundle(String symbolicName)

add the classloader from the given bundle to the LOAD_PATH and the GEM_PATH using the bundle symbolic name

addBundleback to summary
public void addBundle(Bundle bundle)

add the classloader from the given bundle to the LOAD_PATH and the GEM_PATH

addBundleToGemPathback to summary
public void addBundleToGemPath(Bundle bundle)

Deprecated

add the classloader from the given bundle to the GEM_PATH

Annotations
@Deprecated
addBundleToGemPathback to summary
public void addBundleToGemPath(String symbolicName)

Deprecated

add the classloader from the given bundle to the GEM_PATH using the bundle symbolic name

Annotations
@Deprecated
addBundleToLoadPathback to summary
public void addBundleToLoadPath(Bundle bundle)

Deprecated

add the classloader from the given bundle to the LOAD_PATH

Annotations
@Deprecated
addBundleToLoadPathback to summary
public void addBundleToLoadPath(String symbolicName)

Deprecated

add the classloader from the given bundle to the LOAD_PATH using the bundle symbolic name

Annotations
@Deprecated
createUriback to summary
private String createUri(Bundle cl, String ref)

Deprecated

Annotations
@Deprecated
toBundleback to summary
private Bundle toBundle(String symbolicName)
org.jruby.embed.osgi back to summary

pack-priv Class OSGiIsolatedScriptingContainer.BundleGetResources

extends Object
implements Loader
Class Inheritance
  • java.lang.Object
  • org.jruby.embed.osgi.OSGiIsolatedScriptingContainer.BundleGetResources
All Implemented Interfaces
org.jruby.util.Loader

Field Summary

Modifier and TypeField and Description
private final Bundle

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public ClassLoader
public URL
public Enumeration<URL>
public Class<?>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bundleback to summary
private final Bundle bundle

Constructor Detail

BundleGetResourcesback to summary
pack-priv BundleGetResources(Bundle bundle)

Method Detail

getClassLoaderback to summary
public ClassLoader getClassLoader()

Implements org.jruby.util.Loader.getClassLoader.

Annotations
@Override
getResourceback to summary
public URL getResource(String path)

Implements org.jruby.util.Loader.getResource.

Annotations
@Override
getResourcesback to summary
public Enumeration<URL> getResources(String path) throws IOException

Implements org.jruby.util.Loader.getResources.

Annotations
@Override
loadClassback to summary
public Class<?> loadClass(final String name) throws ClassNotFoundException

Implements org.jruby.util.Loader.loadClass.

Annotations
@Override