javax.management.loading
Interface MLetMBean

All Known Implementing Classes:
MLet (src)

public interface MLetMBean

Management interface of an MLet.

See Also:
MLet (src)

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.
 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 getResource(java.lang.String name)
          Returns a resource with a given name from this MLet's classpath.
 java.io.InputStream getResourceAsStream(java.lang.String name)
          Returns a resource with a given name from this MLet's classpath.
 java.util.Enumeration getResources(java.lang.String name)
          Returns all resources with a given name.
 java.net.URL[] getURLs()
          Returns the list of URLs associated with this MLet.
 void setLibraryDirectory(java.lang.String libdir)
           
 

Method Detail

getMBeansFromURL

public java.util.Set getMBeansFromURL(java.lang.String url)
                               throws ServiceNotFoundException (src) 
Loads an MLET text file from a given url. The MLET text file is parsed and the declared MBeans will be registered to the MBean server.

Parameters:
url - url to load the MLET text file from
Returns:
A set of ObjectInstance instances for each registered MBean. If there was an error registering the MBean, a Throwable instance is added to the returned collection.
Throws:
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).

getMBeansFromURL

public java.util.Set getMBeansFromURL(java.net.URL url)
                               throws ServiceNotFoundException (src) 
Loads an MLET text file from a given url. The MLET text file is parsed and the declared MBeans will be registered to the MBean server.

Parameters:
url - url to load the MLET text file from
Returns:
A set of ObjectInstance instances for each registered MBean. If there was an error registering the MBean, a Throwable instance is added to the returned collection.
Throws:
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).

addURL

public void addURL(java.net.URL url)
Adds the given URL to the MLet's classpath.

Parameters:
url - url

addURL

public void addURL(java.lang.String url)
            throws ServiceNotFoundException (src) 
Adds the given URL to the MLet's classpath.

Parameters:
url - url
Throws:
ServiceNotFoundException (src) - if the given URL is malformed

getURLs

public java.net.URL[] getURLs()
Returns the list of URLs associated with this MLet.

Returns:
array of URLs

getResource

public java.net.URL getResource(java.lang.String name)
Returns a resource with a given name from this MLet's classpath.

Parameters:
name - the resource name with a '/' separated path
Returns:
URL to the requested resource, or a null if it could not be found

getResourceAsStream

public java.io.InputStream getResourceAsStream(java.lang.String name)
Returns a resource with a given name from this MLet's classpath.

Parameters:
name - the resource name with a '/' separated path
Returns:
An InputStream to the requested resource, or a null if it could not be found

getResources

public java.util.Enumeration getResources(java.lang.String name)
                                   throws java.io.IOException
Returns all resources with a given name.

Parameters:
name - the resource name with a '/' separated path
Returns:
an enumeration of URLs to the resource, or an empty Enumeration instance if no resources were found
Throws:
java.io.IOException

getLibraryDirectory

public java.lang.String getLibraryDirectory()

setLibraryDirectory

public void setLibraryDirectory(java.lang.String libdir)