All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.jaw.impl.agent.services.mlet.MLetSrv

java.lang.Object
   |
   +----com.sun.jaw.impl.agent.services.mlet.MLetSrv

public class MLetSrv
extends Object
implements Serializable
This class provides an implementation of the management applet or m-let service. The m-let service enables an agent to obtain m-beans remotely. The agent does this by loading a text file stored remotely that specifies information on the m-beans to be obtained. The location of the text file is specified by a URL. The information on each m-bean to be obtained is specified in a single instance of a tag, called the MLET tag. When a text file is loaded, each m-bean specified in the file is instantiated.

An m-bean instantiated by the m-let service is registered in one of the following ways:

The security mode of the MLet Service is specified at instantiation time through a property named secure in the object name. If no secure property is specified then the service assumes unsecure mode to be enabled.

See Also:
MLet

Constructor Index

 o MLetSrv()
Instantiates the m-let service.

Method Index

 o deleteCmf()
Deletes the m-let service.
 o flushMLetClassLoader(URL)
For Java DMK internal use only.
 o getClassVersion()
Returns the version of this class.
 o getLibraryDirectory()
Returns the current directory used by the library loader for storing native libraries before they are loaded into memory.
 o getMLetClassLoader(URL)
For Java DMK internal use only.
 o initCmf(Framework, ObjectName, boolean, ModificationList)
Initializes the m-let service and registers it with the core management framework.
 o newMLetClassLoader(URL, Framework)
For Java DMK internal use only.
 o performGetResource(String, String)
Returns the URL of a resource.
 o performGetResource(URL, String)
Returns the URL of a resource.
 o performGetResourceAsStream(String, String)
Gets an input stream for a resource.
 o performGetResourceAsStream(URL, String)
Gets an input stream for a resource.
 o performLoadURL(String)
Loads a text file containing MLET tags that define the m-beans to be added to the agent.
 o performLoadURL(URL)
Loads a text file containing MLET tags that define the m-beans to be added to the agent.
 o performLocalLoadURL(String)
Loads a text file containing MLET tags that define the m-beans to be added to the agent.
 o performLocalLoadURL(URL)
Loads a text file containing MLET tags that define the m-beans to be added to the agent.
 o performRemoteLoadURL(String)
Loads a text file containing MLET tags that define the m-beans to be added to the agent.
 o performRemoteLoadURL(URL)
Loads a text file containing MLET tags that define the m-beans to be added to the agent.
 o setLibraryDirectory(String)
Sets the current directory used by the library loader for storing native libraries before they are loaded into memory.

Constructors

 o MLetSrv
 public MLetSrv()
Instantiates the m-let service.

Methods

 o initCmf
 public void initCmf(Framework cmf,
                     ObjectName name,
                     boolean db,
                     ModificationList list) throws InstanceAlreadyExistException
Initializes the m-let service and registers it with the core management framework.
For internal use only.

Parameters:
agent - The core management framework to register the service with.
name - Object name.
db - Indicates if persistent storage is required.
list - The modification list to use for setting up parameters.
Throws: InstanceAlreadyExistException
The m-bean is already registered in the repository.
 o deleteCmf
 public void deleteCmf()
Deletes the m-let service.

 o performLoadURL
 public void performLoadURL(URL url) throws ServiceNotFoundException
Loads a text file containing MLET tags that define the m-beans to be added to the agent. The location of the text file is specified by a URL.

This method is allowed in the code of an agent or a manager. It is similar to performLocalLoadURL (allowed only in agent code) or performRemoteLoadURL (allowed only in manager code) except that it does not return.

Parameters:
url - The URL of the text file to be loaded.
Throws: ServiceNotFoundException
One of the following errors has occurred:
  • The m-let text file does not contain an MLET tag.
  • The m-let text file is not found.
  • A mandatory attribute of the MLET tag is not specified.
  • The value of url is null.
 o performLoadURL
 public void performLoadURL(String url) throws ServiceNotFoundException
Loads a text file containing MLET tags that define the m-beans to be added to the agent. The location of the text file is specified by a string representation of its URL.

This method is allowed in the code of an agent or a manager. It is similar to performLocalLoadURL (allowed only in agent code) or performRemoteLoadURL (allowed only in manager code) except that it does not return.

Parameters:
url - A string representation of the URL of the text file to be loaded.
Throws: ServiceNotFoundException
One of the following errors has occurred:
  • The m-let text file does not contain an MLET tag.
  • The m-let text file is not found.
  • A mandatory attribute of the MLET tag is not specified.
  • The value of url is null.
 o performLocalLoadURL
 public Vector performLocalLoadURL(URL url) throws ServiceNotFoundException
Loads a text file containing MLET tags that define the m-beans to be added to the agent. The location of the text file is specified by a URL.

This method is allowed only in the code of an agent.

Parameters:
url - The URL of the text file to be loaded.
Returns:
A vector containing one entry per MLET tag in the m-let text file loaded. Each entry specifies either the reference of the m-bean instantiated, or a throwable object (that is, an error or an exception) if the m-bean could not be instantiated.
Throws: ServiceNotFoundException
One of the following errors has occurred:
  • The m-let text file does not contain an MLET tag.
  • The m-let text file is not found.
  • A mandatory attribute of the MLET tag is not specified.
  • The value of url is null.
 o performLocalLoadURL
 public Vector performLocalLoadURL(String url) throws ServiceNotFoundException
Loads a text file containing MLET tags that define the m-beans to be added to the agent. The location of the text file is specified by a string representation of its URL.

This method is allowed only in the code of an agent.

Parameters:
url - A string representation of the URL of the text file to be loaded.
Returns:
A vector containing one entry per MLET tag in the m-let text file loaded. Each entry specifies either the reference of the m-bean instantiated, or a throwable object (that is, an error or an exception) if the m-bean could not be instantiated.
Throws: ServiceNotFoundException
One of the following errors has occurred:
  • The m-let text file does not contain an MLET tag.
  • The m-let text file is not found.
  • A mandatory attribute of the MLET tag is not specified.
  • The value of url is null.
 o performRemoteLoadURL
 public Vector performRemoteLoadURL(URL url) throws ServiceNotFoundException
Loads a text file containing MLET tags that define the m-beans to be added to the agent. The location of the text file is specified by a URL.

This method is allowed only in the code of a manager.

Parameters:
url - The URL of the text file to be loaded.
Returns:
A vector containing one entry per MLET tag in the m-let text file loaded. Each entry specifies either an instance of class MLet representing the parameters of the MLET tag for the m-bean instantiated, or a throwable object (that is, an error or an exception) if the m-bean could not be instantiated.
Throws: ServiceNotFoundException
One of the following errors has occurred:
  • The m-let text file does not contain an MLET tag.
  • The m-let text file is not found.
  • A mandatory attribute of the MLET tag is not specified.
  • The value of url is null.
 o performRemoteLoadURL
 public Vector performRemoteLoadURL(String url) throws ServiceNotFoundException
Loads a text file containing MLET tags that define the m-beans to be added to the agent. The location of the text file is specified by a string representation of its URL.

This method is allowed only in the code of a manager.

Parameters:
url - A string representation of the URL of the text file to be loaded.
Returns:
A vector containing one entry per MLET tag in the m-let text file loaded. Each entry specifies either an instance of class MLet representing the parameters of the MLET tag for the m-bean instantiated, or a throwable object (that is, an error or an exception) if the m-bean could not be instantiated.
Throws: ServiceNotFoundException
One of the following errors has occurred:
  • The m-let text file does not contain an MLET tag.
  • The m-let text file is not found.
  • A mandatory attribute of the MLET tag is not specified.
  • The value of url is null.
 o performGetResource
 public URL performGetResource(URL codebase,
                               String resource)
Returns the URL of a resource.

Parameters:
codebase - A URL that identifies the code base of the m-let class loader to be used.
resource - The name of the resource.
Returns:
The URL of the resource or null if the resource could not be found.
 o performGetResource
 public URL performGetResource(String codebase,
                               String resource)
Returns the URL of a resource.

Parameters:
codebase - A string that identifies the code base of the m-let class loader to be used.
resource - The name of the resource.
Returns:
The URL of the resource or null if the resource could not be found.
 o performGetResourceAsStream
 public InputStream performGetResourceAsStream(URL codebase,
                                               String resource)
Gets an input stream for a resource.

Parameters:
codebase - A URL that identifies the code base of the m-let class loader to be used.
resource - The name of the resource.
Returns:
An input stream for the resource or null if the resource could not be found.
 o performGetResourceAsStream
 public InputStream performGetResourceAsStream(String codebase,
                                               String resource)
Gets an input stream for a resource.

Parameters:
codebase - A string that identifies the code base of the m-let class loader to be used.
resource - The name of the resource.
Returns:
An input stream for the resource or null if the resource could not be found.
 o newMLetClassLoader
 public static synchronized MLetClassLoader newMLetClassLoader(URL codebase,
                                                               Framework cmf)
For Java DMK internal use only.

Creates a new class loader to be used for loading the classes specified by an MLET tag. If an instance of MLetClassLoader for the specified code base already exists, it is used. Otherwise, a new instance is created and registered with the repository.

Parameters:
codebase - A URL that identifies the code base of the m-let class loader to be created.
cmf - The core management framework that the class loader is to be registered with. If you do not want the class loader to be registered, set this parameter to null.
Returns:
A reference to the m-let class loader or null if it could not be created.
 o getMLetClassLoader
 public static synchronized MLetClassLoader getMLetClassLoader(URL codebase)
For Java DMK internal use only.

Gets the m-let class loader instantiated for a given code base.

Parameters:
codebase - A URL that identifies the code base.
Returns:
A reference to the m-let class loader or null if it could not be found.
 o flushMLetClassLoader
 public static synchronized void flushMLetClassLoader(URL codebase)
For Java DMK internal use only.

Flushes the m-let class loader instantiated for a given code base.

Parameters:
codebase - A URL that identifies the code base.
 o getLibraryDirectory
 public String getLibraryDirectory()
Returns the current directory used by the library loader for storing native libraries before they are loaded into memory.

The value of the directory defaults to /tmp (Solaris) or <installDir>\SUNWconn\jaw\tmp (Windows NT).

 o setLibraryDirectory
 public void setLibraryDirectory(String libdir)
Sets the current directory used by the library loader for storing native libraries before they are loaded into memory.

The value of the directory defaults to /tmp (Solaris) or <installDir>\SUNWconn\jaw\tmp (Windows NT).

 o getClassVersion
 public static String getClassVersion()
Returns the version of this class.


All Packages  Class Hierarchy  This Package  Previous  Next  Index