org.ow2.jonas.resourcemonitor.internal
Class JOnASResourceMonitorService

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.resourcemonitor.internal.JOnASResourceMonitorService
All Implemented Interfaces:
NotificationBroadcaster, NotificationEmitter, JOnASResourceMonitorServiceMBean, ResourceMonitorService, Service

public class JOnASResourceMonitorService
extends AbsServiceImpl
implements ResourceMonitorService, JOnASResourceMonitorServiceMBean

Implementation for the ResourceMonitor interface.

Author:
Mickaƫl LEDUQUE

Field Summary
 
Fields inherited from class org.ow2.jonas.lib.reconfig.ReconfigEmitter
RECONFIG_TYPE, SAVE_RECONFIG_TYPE
 
Constructor Summary
JOnASResourceMonitorService()
           
 
Method Summary
protected  void doStart()
          Abstract start-up method to be implemented by sub-classes.
protected  void doStop()
          Abstract method for service stopping to be implemented by sub-classes.
 org.ow2.util.plan.deployer.api.IDeploymentPlanDeployer getDeploymentPlanDeployer()
          Returns the deployment plan deployer service.
 JmxService getJmxService()
          Returns the JMX service.
 Integer getMonitoredResourcesCount()
          Returns the number of monitored resources.
 List<String> getMonitoredResourcesDescriptions()
          Returns a list of descriptions for the monitored resources.
 Long getMonitoringInterval()
          Returns the approximate time interval between two resource checks.
 org.ow2.util.plan.monitor.api.IResourceMonitor getResourceMonitor()
          Returns the resource monitor.
 void setDeploymentPlanDeployer(org.ow2.util.plan.deployer.api.IDeploymentPlanDeployer deploymentPlanDeployer)
          Sets the deployment plan deployer service.
 void setJmxService(JmxService jmxService)
          Sets the JMX service.
 void setMonitoringInterval(Long interval)
          Sets the approximate time interval between two resource checks.
 void setResourceMonitor(org.ow2.util.plan.monitor.api.IResourceMonitor resourceMonitor)
          Sets the resource monitor.
 
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
 

Constructor Detail

JOnASResourceMonitorService

public JOnASResourceMonitorService()
Method Detail

doStart

protected void doStart()
                throws ServiceException
Abstract start-up method to be implemented by sub-classes.

Specified by:
doStart in class AbsServiceImpl
Throws:
ServiceException - service start-up failed

doStop

protected void doStop()
               throws ServiceException
Abstract method for service stopping to be implemented by sub-classes.

Specified by:
doStop in class AbsServiceImpl
Throws:
ServiceException - service stopping failed

getMonitoredResourcesCount

public Integer getMonitoredResourcesCount()
Returns the number of monitored resources.

Specified by:
getMonitoredResourcesCount in interface JOnASResourceMonitorServiceMBean
Returns:
the number of monitored resources.

getMonitoredResourcesDescriptions

public List<String> getMonitoredResourcesDescriptions()
Returns a list of descriptions for the monitored resources.

Specified by:
getMonitoredResourcesDescriptions in interface JOnASResourceMonitorServiceMBean
Returns:

getMonitoringInterval

public Long getMonitoringInterval()
Returns the approximate time interval between two resource checks.

Specified by:
getMonitoringInterval in interface JOnASResourceMonitorServiceMBean
Returns:
interval the interval in milliseconds.

setMonitoringInterval

public void setMonitoringInterval(Long interval)
Sets the approximate time interval between two resource checks.

Specified by:
setMonitoringInterval in interface JOnASResourceMonitorServiceMBean
Parameters:
interval - the new interval in milliseconds.

setResourceMonitor

public void setResourceMonitor(org.ow2.util.plan.monitor.api.IResourceMonitor resourceMonitor)
Sets the resource monitor.

Parameters:
resourceMonitor - the new resource monitor.

getResourceMonitor

public org.ow2.util.plan.monitor.api.IResourceMonitor getResourceMonitor()
Returns the resource monitor.

Returns:
the resource monitor.

getJmxService

public JmxService getJmxService()
Returns the JMX service.

Returns:
the JMX service.

setJmxService

public void setJmxService(JmxService jmxService)
Sets the JMX service.

Parameters:
jmxService - the new JMX service.

setDeploymentPlanDeployer

public void setDeploymentPlanDeployer(org.ow2.util.plan.deployer.api.IDeploymentPlanDeployer deploymentPlanDeployer)
Sets the deployment plan deployer service.

Parameters:
deploymentPlanDeployer - the new deployment plan deployer service.

getDeploymentPlanDeployer

public org.ow2.util.plan.deployer.api.IDeploymentPlanDeployer getDeploymentPlanDeployer()
Returns the deployment plan deployer service.

Returns:
the deployment plan deployer service.


Copyright © 2010 OW2 Consortium. All Rights Reserved.