|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
javax.management.loading.MLet
URL classloader capable of parsing an MLet text file adhering to the file format defined in the JMX specification (v1.0).
MLetMBean
(src) ,
Serialized FormConstructor Summary | |
MLet()
|
|
MLet(java.net.URL[] urls)
|
|
MLet(java.net.URL[] urls,
boolean delegateToCLR)
|
|
MLet(java.net.URL[] urls,
java.lang.ClassLoader parent)
|
|
MLet(java.net.URL[] urls,
java.lang.ClassLoader parent,
boolean delegateToCLR)
|
|
MLet(java.net.URL[] urls,
java.lang.ClassLoader parent,
java.net.URLStreamHandlerFactory factory)
|
|
MLet(java.net.URL[] urls,
java.lang.ClassLoader parent,
java.net.URLStreamHandlerFactory factory,
boolean delegateToCLR)
|
Method Summary | |
void |
addURL(java.lang.String url)
Adds the given URL to the MLet's classpath. |
void |
addURL(java.net.URL url)
Adds the given URL to the MLet's classpath. |
protected java.net.URL |
check(java.lang.String version,
java.net.URL codebase,
java.lang.String jarfile,
javax.management.loading.MLetContent mlet)
This method is to be overridden when extending this service to support caching and versioning. |
protected java.lang.Class |
findClass(java.lang.String name)
|
protected java.lang.String |
findLibrary(java.lang.String libname)
|
java.lang.String |
getLibraryDirectory()
|
java.util.Set |
getMBeansFromURL(java.lang.String url)
Loads an MLET text file from a given url. |
java.util.Set |
getMBeansFromURL(java.net.URL url)
Loads an MLET text file from a given url. |
java.net.URL[] |
getURLs()
Returns the search path of URLs for loading classes and resources. |
protected java.lang.Class |
loadClass(java.lang.String name,
boolean resolve)
|
java.lang.Class |
loadClass(java.lang.String name,
ClassLoaderRepository (src) clr)
Load a class, using the given ClassLoaderRepository if the class is not found in this MLet's URLs. |
void |
postDeregister()
This method is called by the MBeanServer after deregistration takes place. |
void |
postRegister(java.lang.Boolean registrationDone)
This method is called by the MBeanServer after registration takes place or when registration fails. |
void |
preDeregister()
This method is called by the MBeanServer before deregistration takes place. |
ObjectName (src) |
preRegister(MBeanServer (src) server,
ObjectName (src) name)
This method is called by the MBeanServer before registration takes place. |
void |
readExternal(java.io.ObjectInput in)
This implementation does not support externalizing an MLet. |
void |
setLibraryDirectory(java.lang.String libdir)
|
void |
writeExternal(java.io.ObjectOutput out)
This implementation does not support externalizing an MLet. |
Methods inherited from class java.net.URLClassLoader |
definePackage, findResource, findResources, getPermissions, newInstance, newInstance |
Methods inherited from class java.security.SecureClassLoader |
defineClass |
Methods inherited from class java.lang.ClassLoader |
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.management.loading.MLetMBean (src) |
getResource, getResourceAsStream, getResources |
Constructor Detail |
public MLet()
public MLet(java.net.URL[] urls)
public MLet(java.net.URL[] urls, java.lang.ClassLoader parent)
public MLet(java.net.URL[] urls, java.lang.ClassLoader parent, java.net.URLStreamHandlerFactory factory)
public MLet(java.net.URL[] urls, boolean delegateToCLR)
public MLet(java.net.URL[] urls, java.lang.ClassLoader parent, boolean delegateToCLR)
public MLet(java.net.URL[] urls, java.lang.ClassLoader parent, java.net.URLStreamHandlerFactory factory, boolean delegateToCLR)
Method Detail |
public ObjectName (src) preRegister(MBeanServer (src) server, ObjectName (src) name) throws java.lang.Exception
MBeanRegistration (src)
The MBean can stop the registration by throwing an exception.The exception is forwarded to the invoker wrapped in an MBeanRegistrationException.
preRegister
in interface MBeanRegistration (src)
java.lang.Exception
- for any error, the MBean is not registered.public void postRegister(java.lang.Boolean registrationDone)
MBeanRegistration (src)
postRegister
in interface MBeanRegistration (src)
registrationDone
- the MBeanServer passes true when the
MBean was registered, false otherwise.public void preDeregister() throws java.lang.Exception
MBeanRegistration (src)
The MBean can throw an exception, this will stop the deregistration. The exception is forwarded to the invoker wrapped in an MBeanRegistrationException.
preDeregister
in interface MBeanRegistration (src)
java.lang.Exception
public void postDeregister()
MBeanRegistration (src)
postDeregister
in interface MBeanRegistration (src)
public java.util.Set getMBeansFromURL(java.lang.String url) throws ServiceNotFoundException (src)
MLetMBean (src)
getMBeansFromURL
in interface MLetMBean (src)
url
- url to load the MLET text file from
ServiceNotFoundException (src)
- if the given URL is malformed, or the
given MLET text file cannot be found, or the given text file
does not contain an <MLET> tag or one of the specified
mandatory attributes (see the JMX specification for a list of
mandatory attributes in an MLET text file).public java.util.Set getMBeansFromURL(java.net.URL url) throws ServiceNotFoundException (src)
MLetMBean (src)
getMBeansFromURL
in interface MLetMBean (src)
url
- url to load the MLET text file from
ServiceNotFoundException (src)
- if the
given MLET text file cannot be found, or the given text file
does not contain an <MLET> tag or one of the specified
mandatory attributes (see the JMX specification for a list of
mandatory attributes in an MLET text file).public void addURL(java.net.URL url)
MLetMBean (src)
addURL
in interface MLetMBean (src)
public void addURL(java.lang.String url) throws ServiceNotFoundException (src)
MLetMBean (src)
addURL
in interface MLetMBean (src)
url
- url
ServiceNotFoundException (src)
- if the given URL is malformedpublic java.net.URL[] getURLs()
getURLs
in interface MLetMBean (src)
public java.lang.String getLibraryDirectory()
getLibraryDirectory
in interface MLetMBean (src)
public void setLibraryDirectory(java.lang.String libdir)
setLibraryDirectory
in interface MLetMBean (src)
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException, java.lang.UnsupportedOperationException
readExternal
in interface java.io.Externalizable
java.lang.UnsupportedOperationException
java.io.IOException
java.lang.ClassNotFoundException
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException, java.lang.UnsupportedOperationException
writeExternal
in interface java.io.Externalizable
java.lang.UnsupportedOperationException
java.io.IOException
public java.lang.Class loadClass(java.lang.String name, ClassLoaderRepository (src) clr) throws java.lang.ClassNotFoundException
name
- clr
-
java.lang.ClassNotFoundException
protected java.net.URL check(java.lang.String version, java.net.URL codebase, java.lang.String jarfile, javax.management.loading.MLetContent mlet) throws java.lang.Exception
version
- codebase
- jarfile
- mlet
-
java.lang.Exception
protected java.lang.Class loadClass(java.lang.String name, boolean resolve) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
protected java.lang.Class findClass(java.lang.String name) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
protected java.lang.String findLibrary(java.lang.String libname)
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |