|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.ClassLoader | +--java.security.SecureClassLoader | +--java.net.URLClassLoader | +--com.sun.jaw.impl.agent.services.mlet.MLetClassLoader
This class represents the class loader that the m-let service uses to load classes and resources.
This class loader can load classes and resources from:
CLASSPATH
environment variable
.jar
files
Note - Do not instantiate this class explicitly. The m-let service instantiates this class each time a load URL method is invoked.
When it instantiates this class, the m-let service registers the instance with the repository. This enables a client application to instantiate an m-bean loaded through this class loader by specifying its object name.
The class loader created is registered with an object name of the form:
defaultDomain:
JavaClass.codebase=
baseURL
where:
ServiceName.MLETLOADER
.
CODEBASE
attribute specified in the
MLET
tag.
Constructor Summary | |
MLetClassLoader()
Instantiates the m-let class loader. |
|
MLetClassLoader(java.net.URL codebase)
Instantiates the m-let class loader with a specified codebase . |
Method Summary | |
void |
addJarFileURL(java.lang.String url)
Appends the specified JAR file URL to the list of URLs to search for classes and resources. |
void |
deleteCmf()
Deletes the m-let class loader. |
protected java.lang.Class |
findClass(java.lang.String name)
This is the main method for class loaders that is being redefined. |
protected java.lang.String |
findLibrary(java.lang.String libname)
Returns the absolute path name of a native library. |
static java.lang.String |
getClassVersion()
Gets the version of this class. |
java.net.URL |
getCodeBase()
Gets the code base of this instance of MLetClassLoader . |
ObjectName |
getLoaderName()
Gets the object name of this instance of MLetClassLoader . |
void |
initCmf(Framework cmf,
ObjectName name,
boolean db,
ModificationList list)
Initializes the m-let class loader and sets its codebase property. |
java.lang.Object |
loadSerializedObject(java.net.URL codebase,
java.lang.String filename)
Loads the serialized object specified by the OBJECT
attribute of the MLET tag. |
void |
readExternal(java.io.ObjectInput in)
This method reads the objects contents during Object Serialization. |
void |
writeExternal(java.io.ObjectOutput out)
This method saves the objects contents during Object Serialization. |
Methods inherited from class java.net.URLClassLoader |
addURL,
definePackage,
findResource,
findResources,
getPermissions,
getURLs,
newInstance,
newInstance |
Methods inherited from class java.security.SecureClassLoader |
defineClass |
Methods inherited from class java.lang.ClassLoader |
defineClass,
defineClass,
defineClass,
definePackage,
findLoadedClass,
findSystemClass,
getPackage,
getPackages,
getParent,
getResource,
getResourceAsStream,
getResources,
getSystemClassLoader,
getSystemResource,
getSystemResourceAsStream,
getSystemResources,
loadClass,
loadClass,
resolveClass,
setSigners |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public MLetClassLoader()
public MLetClassLoader(java.net.URL codebase)
codebase
.codebase
- The codebase
.Method Detail |
public void initCmf(Framework cmf, ObjectName name, boolean db, ModificationList list) throws java.lang.IllegalAccessException, InstanceAlreadyExistException
codebase
property.
The method registers the m-let class loader with the core management framework.
This method is not intent to be called directly by the user.
cmf
- The core management framework to register the service with.name
- The object name containing configuration information.db
- Indicates if persistent storage is required.list
- The modification list to use for setting up parameters.public void deleteCmf()
This method is not intent to be called directly by the user.
public void addJarFileURL(java.lang.String url)
url
- The URL to be added to the search path of URLs.protected java.lang.Class findClass(java.lang.String name) throws java.lang.ClassNotFoundException
name
- The name of the class.Class
object.public java.lang.Object loadSerializedObject(java.net.URL codebase, java.lang.String filename) throws java.io.IOException, java.lang.ClassNotFoundException
OBJECT
attribute of the MLET
tag.codebase
- The codebase
.filename
- The name of the file containing the serialized object.protected java.lang.String findLibrary(java.lang.String libname)
OSName/OSArch/OSVersion/lib/nativelibname
), i.e.
the library stat on Solaris SPARC 5.7 will be searched in the JAR file as:
If this method returns null
, i.e. the libraries were not found in any of the JAR
files loaded with this class loader, the VM searches the library along the path specified as
the java.library.path
property.
libname
- The library name.public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
out
- The serialization output stream.public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
in
- The serialization input stream.public static java.lang.String getClassVersion()
public java.net.URL getCodeBase()
MLetClassLoader
.MLetClassLoader
.public ObjectName getLoaderName()
MLetClassLoader
.MLetClassLoader
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |