org.ow2.jonas.deployablemonitor
Class DeployableMonitorService

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by org.ow2.jonas.lib.reconfig.ReconfigEmitter
          extended by org.ow2.jonas.lib.service.AbsServiceImpl
              extended by org.ow2.jonas.deployablemonitor.DeployableMonitorService
All Implemented Interfaces:
NotificationBroadcaster, NotificationEmitter, MonitoringService, Service

public class DeployableMonitorService
extends AbsServiceImpl
implements MonitoringService

Service that will launch the Deployable Monitor.

Author:
Florent BENOIT

Field Summary
static String DEVELOPMENT_MODE_PROPERTY
          Property for the development mode.
static String DIRECTORIES_LIST_PROPERTY
          Property for the list of extra directories to analyze.
protected static String JONAS_BASE
          The name of the JONAS_BASE directory.
 
Fields inherited from class org.ow2.jonas.lib.reconfig.ReconfigEmitter
RECONFIG_TYPE, SAVE_RECONFIG_TYPE
 
Constructor Summary
DeployableMonitorService()
          Default constructor.
 
Method Summary
protected  void doStart()
          Start the Deployable Monitor service.
protected  void doStop()
          Stop the Deployable Monitor service.
 void firstCheckEnded()
          Called when the DeploymentMonitor has finished its first round of deployment (all that was under deploy/ at startup time).
 String[] getDirectoryNames()
          The list of the directory names.
 int getMonitorInterval()
          Returns the monitor interval between each directory scan.
 boolean isDepmonitorDir(String dir)
           
 boolean isDevelopmentMode()
           
 void setDeployerManager(org.ow2.util.ee.deploy.api.deployer.IDeployerManager deployerManager)
           
 void setDevelopmentMode(boolean mode)
          Set developmentMode value to true (enable), or to false (disable).
 void setDevelopmentMode(String mode)
          Set developmentMode value to true (enable), or to false (disable).
 void setDirectories(String dirs)
           
 void setExclusions(String exclusionList)
           
 void setJ2EEServer(J2EEServerService j2eeServer)
           
 void setJmxService(JmxService jmxService)
           
 void setMonitorInterval(int monitorInterval)
          Set the monitor interval between each directory scan.
 void startMonitoring()
          Starts the DeployableMonitor instance.
 
Methods inherited from class org.ow2.jonas.lib.service.AbsServiceImpl
convertToList, doInit, getDomainName, getJonasServerName, getName, getServerProperties, init, isStarted, setName, setServerProperties, start, stop, throwRequirementException, toString
 
Methods inherited from class org.ow2.jonas.lib.reconfig.ReconfigEmitter
initLogger, sendReconfigNotification, sendSaveNotification
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.ow2.jonas.service.Service
getName, init, isStarted, setName, start, stop
 

Field Detail

DEVELOPMENT_MODE_PROPERTY

public static final String DEVELOPMENT_MODE_PROPERTY
Property for the development mode.

See Also:
Constant Field Values

DIRECTORIES_LIST_PROPERTY

public static final String DIRECTORIES_LIST_PROPERTY
Property for the list of extra directories to analyze.

See Also:
Constant Field Values

JONAS_BASE

protected static final String JONAS_BASE
The name of the JONAS_BASE directory.

Constructor Detail

DeployableMonitorService

public DeployableMonitorService()
Default constructor.

Method Detail

doStart

protected void doStart()
                throws ServiceException
Start the Deployable Monitor service.

Specified by:
doStart in class AbsServiceImpl
Throws:
ServiceException - if the startup failed.

startMonitoring

public void startMonitoring()
Starts the DeployableMonitor instance.

Specified by:
startMonitoring in interface MonitoringService

doStop

protected void doStop()
               throws ServiceException
Stop the Deployable Monitor service.

Specified by:
doStop in class AbsServiceImpl
Throws:
ServiceException - if the stop failed.

setDirectories

public void setDirectories(String dirs)
Parameters:
dirs - List of deployment directories to observe.

getDirectoryNames

public String[] getDirectoryNames()
The list of the directory names.

Returns:
The list of the directory names.

isDepmonitorDir

public boolean isDepmonitorDir(String dir)

setExclusions

public void setExclusions(String exclusionList)
Parameters:
exclusionList - The list of exclusion patterns.

setDeployerManager

public void setDeployerManager(org.ow2.util.ee.deploy.api.deployer.IDeployerManager deployerManager)
Parameters:
deployerManager - the IDeployerManager to set

setJmxService

public void setJmxService(JmxService jmxService)
Parameters:
jmxService - the jmxService to set

setJ2EEServer

public void setJ2EEServer(J2EEServerService j2eeServer)
Parameters:
j2eeServer - the j2eeServer to set

firstCheckEnded

public void firstCheckEnded()
Called when the DeploymentMonitor has finished its first round of deployment (all that was under deploy/ at startup time).


isDevelopmentMode

public boolean isDevelopmentMode()
Returns:
true if the development mode set to true.

setDevelopmentMode

public void setDevelopmentMode(String mode)
Set developmentMode value to true (enable), or to false (disable). "inherit" case: correspondence between the service and the server development mode

Parameters:
mode - value to set

setDevelopmentMode

public void setDevelopmentMode(boolean mode)
Set developmentMode value to true (enable), or to false (disable).

Parameters:
mode - value to set

setMonitorInterval

public void setMonitorInterval(int monitorInterval)
Set the monitor interval between each directory scan.

Parameters:
monitorInterval - value to set

getMonitorInterval

public int getMonitorInterval()
Returns the monitor interval between each directory scan.



Copyright © 2010 OW2 Consortium. All Rights Reserved.