All Packages  Class Hierarchy  This Package  Previous  Next  Index

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

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

public class LauncherSrv
extends Object
implements Serializable
This class will demand the MLet Service to load all the HTML files contained in a specific directory. If the initCmf method of the object is called, the MLet Service used will be the one registered within the repository with the following ObjectName:

The directory used by the service to look for files defaults depending on the operating environment to:

The service will load the files using alphanumeric ordering.

It is possible to specify a path containing several directories. To do so, use the path separator specific to the platform on which you are running the agent (check the "path.separator" property).

There are several ways for specifying a path:


Constructor Index

 o LauncherSrv()
Default constructor.
 o LauncherSrv(MLetSrv)
Create a launching service.
 o LauncherSrv(MLetSrv, String)
Create a launching service with a specific path.

Method Index

 o getClassVersion()
Returns the version of this class.
 o getMLetSrv()
Returns a reference on the mlet service invoked for loading.
 o getMLetSrvObjectName()
Returns a String representing the ObjectName of the mlet service invoked for loading.
 o getPath()
Returns the path used by the service.
 o getThreadGroup()
Get the thread group used for creating the threads.
 o initCmf(Framework, ObjectName, boolean, ModificationList)
Initialize the Launcher Service.
 o performLaunch()
Load the content of the path.
 o setMLetSrv(MLetSrv)
Sets direct reference to the mlet service to use.
 o setMLetSrvObjectName(String)
Sets a String representing the ObjectName of the mlet service to use.
 o setPath(String)
Sets the path used for loading the HTML files.
 o setThreadGroup(ThreadGroup)
Set the thread group to use when creating the threads for loading.

Constructors

 o LauncherSrv
 public LauncherSrv()
Default constructor. Default path will be used.

 o LauncherSrv
 public LauncherSrv(MLetSrv mletSrv)
Create a launching service.

Parameters:
mletSrv - reference to the mlet service to invoke
 o LauncherSrv
 public LauncherSrv(MLetSrv mletSrv,
                    String path)
Create a launching service with a specific path.

Parameters:
mletSrv - reference to the mlet service to invoke
path - path to look for the HTML files

Methods

 o initCmf
 public void initCmf(Framework cmf,
                     ObjectName name,
                     boolean db,
                     ModificationList list) throws InstanceAlreadyExistException
Initialize the Launcher Service. The method will declare the object to the Core Management Framework.
For internal use only.

Parameters:
agent - The core management framework to register the service with.
name - Object name containing configuration information.
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 performLaunch
 public void performLaunch() throws ServiceNotFoundException
Load the content of the path. The method will ask the mlet service associated to the launcher to load all the files contained in a given path.
If there is no mlet service associated, a ServiceNotFoundException is thrown. If an objet name for the mlet is given, it has precedence over a direct reference to a mlet object.
Every single loading is invoked in a separate thread. All the created threads are created in the same ThreadGroup. They are named using the directory name currently loaded.

Throws: ServiceNotFoundException
The MLet Service couldn't be found.
See Also:
getThreadGroup, setThreadGroup
 o getPath
 public String getPath()
Returns the path used by the service.

 o setPath
 public void setPath(String path)
Sets the path used for loading the HTML files.

 o getMLetSrvObjectName
 public String getMLetSrvObjectName()
Returns a String representing the ObjectName of the mlet service invoked for loading. If the mlet to use was specified using a direct reference to the service through the setMLetSrv method , this method will return null.

 o getMLetSrv
 public MLetSrv getMLetSrv()
Returns a reference on the mlet service invoked for loading.

 o setMLetSrv
 public void setMLetSrv(MLetSrv mlet)
Sets direct reference to the mlet service to use.

See Also:
setMLetSrvObjectName
 o setMLetSrvObjectName
 public void setMLetSrvObjectName(String mlet)
Sets a String representing the ObjectName of the mlet service to use. Such a mlet has precedence over an mlet service reigstered using the setMLetSrv method.

See Also:
setMLetSrvObjectName
 o getClassVersion
 public static String getClassVersion()
Returns the version of this class.

 o getThreadGroup
 public ThreadGroup getThreadGroup()
Get the thread group used for creating the threads.

 o setThreadGroup
 public void setThreadGroup(ThreadGroup threadGroup)
Set the thread group to use when creating the threads for loading.

Parameters:
threadGroup - the thread group to use.

All Packages  Class Hierarchy  This Package  Previous  Next  Index