org.jboss.varia.scheduler.example
Class SchedulableMBeanExample

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.varia.scheduler.example.SchedulableMBeanExample
All Implemented Interfaces:
MBeanRegistration, NotificationBroadcaster, NotificationEmitter, org.jboss.kernel.spi.dependency.KernelControllerContextAware, Service, ServiceMBean, SchedulableMBeanExampleMBean

public class SchedulableMBeanExample
extends ServiceMBeanSupport
implements SchedulableMBeanExampleMBean

A sample SchedulableMBean that records when an event is received.

Version:
$Revision: 81038 $
Author:
Andreas Schaefer, Cameron (camtabor)

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
SchedulableMBeanExample()
           
 
Method Summary
 int getHitCount()
          Returns the number of hits.
 Date getHitDate()
          Returns the last hit date.
 Notification getHitNotification()
          Returns the last hit notification.
 long getRemainingRepetitions()
          Returns the last hit date.
 ObjectName getSchedulerName()
          Returns the object name.
 String getTestString()
          Returns the test string.
 void hit(Notification notification, Date date, long repetitions, ObjectName name, String test)
          Called by ScheduleManager.
 String toString()
          Returns a debug string.
 
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, pojoChange, pojoCreate, pojoDestroy, pojoStart, pojoStop, postDeregister, postRegister, preDeregister, preRegister, setKernelControllerContext, start, startService, stop, stopService, unsetKernelControllerContext
 
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, 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

SchedulableMBeanExample

public SchedulableMBeanExample()
Method Detail

hit

public void hit(Notification notification,
                Date date,
                long repetitions,
                ObjectName name,
                String test)
Called by ScheduleManager.

Specified by:
hit in interface SchedulableMBeanExampleMBean

getHitCount

public int getHitCount()
Returns the number of hits.

Specified by:
getHitCount in interface SchedulableMBeanExampleMBean

getHitDate

public Date getHitDate()
Returns the last hit date.

Specified by:
getHitDate in interface SchedulableMBeanExampleMBean

getHitNotification

public Notification getHitNotification()
Returns the last hit notification.

Specified by:
getHitNotification in interface SchedulableMBeanExampleMBean

getRemainingRepetitions

public long getRemainingRepetitions()
Returns the last hit date.

Specified by:
getRemainingRepetitions in interface SchedulableMBeanExampleMBean

getSchedulerName

public ObjectName getSchedulerName()
Returns the object name.

Specified by:
getSchedulerName in interface SchedulableMBeanExampleMBean

getTestString

public String getTestString()
Returns the test string.

Specified by:
getTestString in interface SchedulableMBeanExampleMBean

toString

public String toString()
Returns a debug string.

Overrides:
toString in class Object


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.