org.jboss.varia.scheduler
Interface ScheduleManagerMBean

All Superinterfaces:
org.jboss.system.Service, org.jboss.system.ServiceMBean
All Known Implementing Classes:
ScheduleManager

public interface ScheduleManagerMBean
extends org.jboss.system.ServiceMBean

ScheduleManagerMBean interface.

Version:
$Revision: 1.1.4.4 $
Author:
Andreas Schaefer, Dimitris Andreadis

Field Summary
static javax.management.ObjectName OBJECT_NAME
          The default ObjectName
 
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
 
Method Summary
 int addSchedule(javax.management.ObjectName provider, javax.management.ObjectName target, String methodName, String[] methodSignature, Date startDate, long period, int repetitions)
          Adds a new Schedule to the Scheduler
 String getTimerName()
           
 boolean isStartAtStartup()
           
 void registerProvider(String providerObjectName)
          Register a Schedule Provider to make him available.
 void removeSchedule(int identification)
          Removes a Schedule so that no notification is sent anymore
 void restartSchedule()
          Stops and restarts the service
 void setStartAtStartup(boolean startAtStartup)
          Whether the scheduler should be started upon MBean start or not
 void setTimerName(String timerObjectName)
          The JMX timer to use for the actual scheduling
 void startSchedules()
          Starts all the registered Schedules
 void stopSchedules(boolean doItNow)
          Stops all the registered Schedules
 void unregisterProvider(String providerObjectName)
          Unregister a Schedule Provider which in turn calls back stopProviding() to indicate to the Provider that it should remove all the Schedules.
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Field Detail

OBJECT_NAME

static final javax.management.ObjectName OBJECT_NAME
The default ObjectName

Method Detail

setStartAtStartup

void setStartAtStartup(boolean startAtStartup)
Whether the scheduler should be started upon MBean start or not


isStartAtStartup

boolean isStartAtStartup()

setTimerName

void setTimerName(String timerObjectName)
The JMX timer to use for the actual scheduling


getTimerName

String getTimerName()

startSchedules

void startSchedules()
Starts all the registered Schedules


stopSchedules

void stopSchedules(boolean doItNow)
Stops all the registered Schedules

Parameters:
doItNow - currently ignored

restartSchedule

void restartSchedule()
Stops and restarts the service


registerProvider

void registerProvider(String providerObjectName)
Register a Schedule Provider to make him available. This method calls startProviding() on the Provider to indicate that the Provider can start adding Schedules.

Parameters:
providerObjectName - Object Name of the Provider

unregisterProvider

void unregisterProvider(String providerObjectName)
Unregister a Schedule Provider which in turn calls back stopProviding() to indicate to the Provider that it should remove all the Schedules.

Parameters:
providerObjectName - Object Name of the Provider

addSchedule

int addSchedule(javax.management.ObjectName provider,
                javax.management.ObjectName target,
                String methodName,
                String[] methodSignature,
                Date startDate,
                long period,
                int repetitions)
Adds a new Schedule to the Scheduler

Parameters:
target - Object Name of the Target MBean
methodName - Name of the method to be called
methodSignature - List of Attributes of the method to be called where ...
startDate - Date when the schedule is started
repetitions - Initial Number of repetitions
Returns:
identification of the Schedule used later to remove it if necessary

removeSchedule

void removeSchedule(int identification)
Removes a Schedule so that no notification is sent anymore

Parameters:
identification - id returned by addSchedule().


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