Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.management.loading
Interface MLetMBean

All Known Implementing Classes:
  MLet

public interface MLetMBean

Management interface of an MLet.

Version:
  $Revision: 1.4 $
Author:
  Juha Lindfors.
See Also:
  `MLet`

Method Summary
`void` | `addURL(String url)` Adds the given URL to the MLet's classpath.
`void` | `addURL(URL url)` Adds the given URL to the MLet's classpath.
`String` | `getLibraryDirectory()`
`Set` | `getMBeansFromURL(String url)` Loads an MLET text file from a given url.
`Set` | `getMBeansFromURL(URL url)` Loads an MLET text file from a given url.
`URL` | `getResource(String name)` Returns a resource with a given name from this MLet's classpath.
`InputStream` | `getResourceAsStream(String name)` Returns a resource with a given name from this MLet's classpath.
`Enumeration` | `getResources(String name)` Returns all resources with a given name.
`URL[]` | `getURLs()` Returns the list of URLs associated with this MLet.
`void` | `setLibraryDirectory(String libdir)`

Method Detail

### getMBeansFromURL

    public Set getMBeansFromURL(String url)
                         throws ServiceNotFoundException

  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` - 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 Set getMBeansFromURL(URL url)
                         throws ServiceNotFoundException

  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` - 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(URL url)

  Adds the given URL to the MLet's classpath.

  Parameters:
    `url` - url

### addURL

    public void addURL(String url)
                throws ServiceNotFoundException

  Adds the given URL to the MLet's classpath.

  Parameters:
    `url` - url
  Throws:
    `ServiceNotFoundException` - if the given URL is malformed

### getURLs

    public URL[] getURLs()

  Returns the list of URLs associated with this MLet.

  Returns:
    array of URLs

### getResource

    public URL getResource(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 InputStream getResourceAsStream(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 Enumeration getResources(String name)
                             throws 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:
    `IOException`

### getLibraryDirectory

    public String getLibraryDirectory()

### setLibraryDirectory

    public void setLibraryDirectory(String libdir)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.