JBoss API: Class SchedulableExample

org.jboss.util
Class SchedulableExample

java.lang.Object
  |
  +--javax.management.NotificationBroadcasterSupport
        |
        +--org.jboss.util.ServiceMBeanSupport
              |
              +--org.jboss.util.SchedulableExample
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, SchedulableExampleMBean, Service, ServiceMBean

public class SchedulableExample
extends ServiceMBeanSupport
implements SchedulableExampleMBean

Scheduler Instance to allow clients to run this as a scheduling service for any Schedulable instances.
ATTENTION: The scheduler instance only allows to run one schedule at a time. Therefore when you want to run two schedules create to instances with this MBean. Suggested Object Name for the MBean are:
jboss:service=Scheduler,schedule=
This way you should not run into a name conflict.

Author:
Andreas Schaefer, Cameron (camtabor)

Revisions:

20010814 Cameron:

20011026 Andy:

20020117 Andy:


Fields inherited from class org.jboss.util.ServiceMBeanSupport
log, server
 
Fields inherited from interface org.jboss.util.SchedulableExampleMBean
OBJECT_NAME
 
Fields inherited from interface org.jboss.util.ServiceMBean
STARTED, STARTING, states, STOPPED, STOPPING
 
Constructor Summary
SchedulableExample()
          Default (no-args) Constructor
 
Method Summary
 java.lang.String getName()
           
 javax.management.ObjectName getObjectName(javax.management.MBeanServer pServer, javax.management.ObjectName pName)
           
 void hit(javax.management.Notification lNotification, java.util.Date lDate, long lRepetitions, javax.management.ObjectName lName, java.lang.String lTest)
           
 
Methods inherited from class org.jboss.util.ServiceMBeanSupport
destroy, destroyService, getServer, getState, getStateString, init, initService, nextSequenceNumber, postDeregister, postRegister, preDeregister, preRegister, start, startService, stop, stopService
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, 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.util.ServiceMBean
getState, getStateString
 
Methods inherited from interface org.jboss.util.Service
destroy, init, start, stop
 

Constructor Detail

SchedulableExample

public SchedulableExample()
Default (no-args) Constructor
Method Detail

hit

public void hit(javax.management.Notification lNotification,
                java.util.Date lDate,
                long lRepetitions,
                javax.management.ObjectName lName,
                java.lang.String lTest)
Specified by:
hit in interface SchedulableExampleMBean

getObjectName

public javax.management.ObjectName getObjectName(javax.management.MBeanServer pServer,
                                                 javax.management.ObjectName pName)
                                          throws javax.management.MalformedObjectNameException
Overrides:
getObjectName in class ServiceMBeanSupport

getName

public java.lang.String getName()
Specified by:
getName in interface ServiceMBean
Overrides:
getName in class ServiceMBeanSupport


Copyright © 2000 The JBoss Organization. All Rights Reserved.