Package org.jruby.embed.osgi.internal
Class OSGiLoadService
java.lang.Object
org.jruby.runtime.load.LoadService
org.jruby.embed.osgi.internal.OSGiLoadService
Load scripts and java classes directly from the OSGi bundles.
bundle:/symbolic.name/
- Author:
- hmalphettes
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jruby.runtime.load.LoadService
LoadService.LoadPathMethods, LoadService.SuffixType
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final RubyInstanceConfig.LoadServiceCreator
Fields inherited from class org.jruby.runtime.load.LoadService
extensionPattern, jarFiles, librarySearcher, loadedFeatures, loadPath, mainScript, mainScriptPath, runtime, sourcePattern
-
Constructor Summary
ConstructorsConstructorDescriptionOSGiLoadService
(Ruby runtime) Default constructor Optional constructor (why?) -
Method Summary
Modifier and TypeMethodDescriptionprotected LibrarySearcher.FoundLibrary
createLibrary
(String baseName, String loadName, LoadServiceResource resource) Support for 'bundle:/' to look for libraries in osgi bundles.protected LoadServiceResource
findFileInClasspath
(String name) Support for 'bundle:/' to look for libraries in osgi bundles or classes or ruby files.protected String
resolveLoadName
(LoadServiceResource foundResource, String previousPath) protected LibrarySearcher.FoundLibrary
searchForLoad
(String searchFile) Replaces findLibraryBySearchState but split off for load.protected LibrarySearcher.FoundLibrary
searchForRequire
(String searchFile) Methods inherited from class org.jruby.runtime.load.LoadService
addPath, addPaths, addPaths, autoloadRequire, checkEmptyLoad, classpathFilenameFromURL, debugLogFound, debugLogFound, debugLogTry, featureAlreadyLoaded, featureAlreadyLoaded, findLibraryWithClassloaders, getClassPathResource, getLoadedFeatures, getLoadPath, getLoadPathEntry, getMainScript, getMainScriptPath, getPathForLocation, getWrapperSelf, init, isJarfileLibrary, isRequireable, load, load, loadFromClassLoader, provide, reflectedLoad, require, searchForRequire, setMainScript, tearDown, tryLoadingLibraryOrScript, warnCircularRequire
-
Field Details
-
OSGI_BUNDLE_CLASSPATH_SCHEME
- See Also:
-
OSGI_DEFAULT
-
-
Constructor Details
-
OSGiLoadService
Default constructor Optional constructor (why?)- Parameters:
runtime
-
-
-
Method Details
-
searchForRequire
-
searchForLoad
Description copied from class:LoadService
Replaces findLibraryBySearchState but split off for load. Needed for OSGiLoadService to override.- Overrides:
searchForLoad
in classLoadService
-
findFileInClasspath
Support for 'bundle:/' to look for libraries in osgi bundles or classes or ruby files.MRI: rb_find_file
- Overrides:
findFileInClasspath
in classLoadService
- Parameters:
name
- the file to find, this is a path name- Returns:
- the correct file
-
createLibrary
protected LibrarySearcher.FoundLibrary createLibrary(String baseName, String loadName, LoadServiceResource resource) Support for 'bundle:/' to look for libraries in osgi bundles.- Overrides:
createLibrary
in classLoadService
-
resolveLoadName
- Overrides:
resolveLoadName
in classLoadService
-