org.jboss.monitor.services
Class TimerService

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.monitor.services.TimerService
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, TimerServiceMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class TimerService
extends org.jboss.system.ServiceMBeanSupport
implements TimerServiceMBean

A simple service used to configure the periodic emition of notifications by a standard JMX Timer.

Version:
$Revision: 57210 $
Author:
Dimitris Andreadis

Field Summary
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
TimerService()
          CTOR
 
Method Summary
 boolean getFixedRate()
           
 String getNotificationMessage()
           
 String getNotificationType()
           
 long getRepeatitions()
           
 javax.management.ObjectName getTimerMBean()
           
 String getTimerPeriod()
           
 void setFixedRate(boolean fixedRate)
          The execution mode, true==fixed-rate, false==fixed-delay (default)
 void setNotificationMessage(String message)
          The message carried by the emitted notifications
 void setNotificationType(String type)
          The type of the emitted notifications
 void setRepeatitions(long repeatitions)
          Number of occurences
 void setTimerMBean(javax.management.ObjectName timerMBean)
          The utilized TimerMBean
 void setTimerPeriod(String timerPeriod)
          Timer period in milliseconds; accepts suffix modifiers e.g.
 void startService()
          Start
 void stopService()
          Stop
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, createService, destroy, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Constructor Detail

TimerService

public TimerService()
CTOR

Method Detail

setNotificationType

public void setNotificationType(String type)
Description copied from interface: TimerServiceMBean
The type of the emitted notifications

Specified by:
setNotificationType in interface TimerServiceMBean

getNotificationType

public String getNotificationType()
Specified by:
getNotificationType in interface TimerServiceMBean

setNotificationMessage

public void setNotificationMessage(String message)
Description copied from interface: TimerServiceMBean
The message carried by the emitted notifications

Specified by:
setNotificationMessage in interface TimerServiceMBean

getNotificationMessage

public String getNotificationMessage()
Specified by:
getNotificationMessage in interface TimerServiceMBean

setTimerPeriod

public void setTimerPeriod(String timerPeriod)
Description copied from interface: TimerServiceMBean
Timer period in milliseconds; accepts suffix modifiers e.g. "1000", "500msec", "10sec", "5min", "1h"

Specified by:
setTimerPeriod in interface TimerServiceMBean

getTimerPeriod

public String getTimerPeriod()
Specified by:
getTimerPeriod in interface TimerServiceMBean

setRepeatitions

public void setRepeatitions(long repeatitions)
Description copied from interface: TimerServiceMBean
Number of occurences

Specified by:
setRepeatitions in interface TimerServiceMBean

getRepeatitions

public long getRepeatitions()
Specified by:
getRepeatitions in interface TimerServiceMBean

setFixedRate

public void setFixedRate(boolean fixedRate)
Description copied from interface: TimerServiceMBean
The execution mode, true==fixed-rate, false==fixed-delay (default)

Specified by:
setFixedRate in interface TimerServiceMBean

getFixedRate

public boolean getFixedRate()
Specified by:
getFixedRate in interface TimerServiceMBean

setTimerMBean

public void setTimerMBean(javax.management.ObjectName timerMBean)
Description copied from interface: TimerServiceMBean
The utilized TimerMBean

Specified by:
setTimerMBean in interface TimerServiceMBean

getTimerMBean

public javax.management.ObjectName getTimerMBean()
Specified by:
getTimerMBean in interface TimerServiceMBean

startService

public void startService()
                  throws Exception
Start

Overrides:
startService in class org.jboss.system.ServiceMBeanSupport
Throws:
Exception

stopService

public void stopService()
Stop

Overrides:
stopService in class org.jboss.system.ServiceMBeanSupport


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