java.lang.Objectjava.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
javax.management.loading.MLet
All Implemented Interfaces:
MLetMBean, Externalizable, MBeanRegistration
Direct Known Subclasses:
PrivateMLet
The MLET tag has the following syntax:
<MLET
CODE = class | OBJECT = serfile
ARCHIVE = "archiveList"
[CODEBASE = codebaseURL]
[NAME = mbeanname]
[VERSION = version]
>
[arglist]
</MLET>
where:
CODE = class.class file of the MBean must be contained in one of the .jar files specified by the ARCHIVE
attribute. Either CODE or OBJECT must be present.
OBJECT = serfile.ser file that contains a serialized representation of the MBean to be obtained.
This file must be contained in one of the .jar files specified by the ARCHIVE attribute. If the .jar file contains a directory hierarchy, specify the path of the file within this hierarchy. Otherwise a match will not be found. Either CODE or OBJECT must be present.
ARCHIVE = "archiveList".jar files
containing MBeans or other resources used by
the MBean to be obtained. One of the .jar files must contain the file specified by the CODE or OBJECT attribute.
If archivelist contains more than one file:
.jar files in archivelist must be stored in the directory specified by the code base URL.
CODEBASE = codebaseURL.jar files specified by the ARCHIVE attribute. Specify this attribute only if the .jar files are not in the same
directory as the m-let text file. If this attribute is not specified, the base URL of the m-let text file is used.
NAME = mbeannameVERSION = version.jar files to be obtained. This version number can
be used to specify that the .jar files are loaded from the
server to update those stored locally in the cache the next time the m-let
text file is loaded. version must be a series of non-negative
decimal integers each separated by a period from the one that precedes it.
ARG TYPE=argumentType VALUE=value>
The arguments' type in the argument list should be a Java primitive type or a Java basic type
(java.lang.Boolean, java.lang.Byte, java.lang.Short, java.lang.Long, java.lang.Integer, java.lang.Float, java.lang.Double, java.lang.String).
The m-let service extends the java.net.URLClassLoader and can be used to load remote classes
and jar files in the VM of the agent.
Note - The MLet class loader uses the javax.management.MBeanServerFactory#getClassLoaderRepository(javax.management.MBeanServer)
to load classes that could not be found in the loaded jar files.
1.5 - | Fields inherited from java.net.URLClassLoader: |
|---|
| ucp |
| Fields inherited from java.lang.ClassLoader: |
|---|
| nocerts, classAssertionStatus |
| Constructor: |
|---|
|
|
|
|
|
|
|
| Method from javax.management.loading.MLet Summary: |
|---|
| addURL, addURL, check, findClass, findClass, findLibrary, getLibraryDirectory, getMBeansFromURL, getMBeansFromURL, getURLs, loadClass, postDeregister, postRegister, preDeregister, preRegister, readExternal, setLibraryDirectory, writeExternal |
| Methods from java.net.URLClassLoader: |
|---|
| addURL, definePackage, findClass, findResource, findResources, getPermissions, getURLs, newInstance, newInstance |
| Methods from java.security.SecureClassLoader: |
|---|
| defineClass, defineClass, getPermissions |
| Methods from java.lang.Object: |
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from javax.management.loading.MLet Detail: |
|---|
|
|
This method is to be overridden when extending this service to support caching and versioning. It is called from getMBeansFromURL when the version, codebase, and jarfile have been extracted from the MLet file, and can be used to verify that it is all right to load the given MBean, or to replace the given URL with a different one. The default implementation of this method returns
|
|
|
OSName/OSArch/OSVersion/lib/nativelibname), i.e.
the library stat on Solaris SPARC 5.7 will be searched in the JAR file as: More specifically, let {@code nativelibname} be the result of
System.mapLibraryName {@code (libname)}. Then the following names are
searched in the JAR files, in order:
If this method returns |
|
|
|
|
Load a class, using the given ClassLoaderRepository if the class is not found in this MLet's URLs. The given ClassLoaderRepository can be null, in which case a ClassNotFoundException occurs immediately if the class is not found in this MLet's URLs. |
|
|
|
|
Restore this MLet's contents from the given ObjectInput . Not all implementations support this method. Those that do not throw UnsupportedOperationException . A subclass may override this method to support it or to change the format of the read data. The format of the read data is not specified, but if an implementation supports #readExternal it must also support #writeExternal in such a way that what is written by the latter can be read by the former. |
|
Save this MLet's contents to the given ObjectOutput . Not all implementations support this method. Those that do not throw UnsupportedOperationException . A subclass may override this method to support it or to change the format of the written data. The format of the written data is not specified, but if an implementation supports #writeExternal it must also support #readExternal in such a way that what is written by the former can be read by the latter. |