Voyager ORB

com.objectspace.voyager.loader
Class MSVoyagerClassLoader

com.objectspace.voyager.loader.MSVoyagerClassLoader

public final class MSVoyagerClassLoader

VoyagerClassLoader is the default class loader, and supports custom loading of resources such as classes and proxies.

A VoyagerClassLoader maintains a list of prioritized resource loaders that implement IResourceLoader. If a resource cannot be found in the local CLASSPATH, each loader is sent getResourceAsStream( name ), starting at the loader with the highest priority. If two or more resource loaders are added at the same priority level, they are consulted in the order they were added.

The dynamic proxy generator implements IResourceLoader and is automatically installed at priority 5.

Version:
3.0

Method Summary
 java.io.InputStream getLocalResourceAsStream(java.lang.String name)
          Searches all installed resource loaders for the resource name specified.
 java.net.URL getResource(java.lang.String name)
          Return a URL for the requested resource.
 java.io.InputStream getResourceAsStream(java.lang.String name)
          Return an InputStream containing the bytes for the requested resource.
protected  java.lang.Class loadClass(java.lang.String name, boolean resolve)
          Load the specifed class, resolving if necessary.
 

Method Detail

loadClass

protected java.lang.Class loadClass(java.lang.String name,
                                    boolean resolve)
                             throws java.lang.ClassNotFoundException
Load the specifed class, resolving if necessary.
Parameters:
name - The full name of the class to load.
resolve - If true, resolve immediately.
Throws:
java.lang.ClassNotFoundException - The class was not found.

getResource

public java.net.URL getResource(java.lang.String name)
Return a URL for the requested resource. Resources provided by IResourceLoaders are not returned by this method.
Parameters:
name - The filename, including path, of a particular resource.

getResourceAsStream

public java.io.InputStream getResourceAsStream(java.lang.String name)
Return an InputStream containing the bytes for the requested resource.
Parameters:
name - The full filename of a particular resource.

getLocalResourceAsStream

public java.io.InputStream getLocalResourceAsStream(java.lang.String name)
Searches all installed resource loaders for the resource name specified.

ObjectSpace Inc.

(c) Copyright 1997-1999 ObjectSpace, Inc.
14850 Quorum Drive, Suite 500
Dallas, Texas 75240