站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 varia API Documentation 英文版文档

ScheduleManagerMBean (Various API) - JBoss 4.0.1 sp1 varia API Documentation 英文版文档


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

MBean interface.


Field Summary
static javax.management.ObjectName OBJECT_NAME
           
 
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 pProvider, javax.management.ObjectName pTarget, String pMethodName, String[] pMethodSignature, Date pStartDate, long pPeriod, int pRepetitions)
          Adds a new Schedule to the Scheduler
 String getTimerName()
           
 boolean isStartAtStartup()
           
 void registerProvider(String pProviderObjectName)
          Register a Provider to make him available.
 void removeSchedule(int pIdentification)
          Removes a Schedule so that no notification is sent anymore
 void restartSchedule()
          Stops the server right now and starts it right now.
 void setStartAtStartup(boolean pStartAtStartup)
          Set the scheduler to start when MBean started or not.
 void setTimerName(String pTimerName)
           
 void startSchedules()
          Starts all the containing Schedules
 void stopSchedules(boolean pDoItNow)
          Stops all the sontaining Schedules
 void unregisterProvider(String pProviderObjectName)
          Unregister a Provider which in turn calls "stopProviding()" indicating to the Provider to 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

public static final javax.management.ObjectName OBJECT_NAME
Method Detail

startSchedules

public void startSchedules()
Starts all the containing Schedules


stopSchedules

public void stopSchedules(boolean pDoItNow)
Stops all the sontaining Schedules

Parameters:
pDoItNow - If true all the schedules are stopped immeditaly otherwise it waits until the next notification is sent

restartSchedule

public void restartSchedule()
Stops the server right now and starts it right now.


registerProvider

public void registerProvider(String pProviderObjectName)
Register a Provider to make him available. In turn this method calls "startProviding()" method on the Provider to indicate that the Provider can start adding Schedules.

Parameters:
pProviderObjectName - Object Name of the Provider

unregisterProvider

public void unregisterProvider(String pProviderObjectName)
Unregister a Provider which in turn calls "stopProviding()" indicating to the Provider to remove all the Schedules.

Parameters:
pProviderObjectName - Object Name of the Provider

addSchedule

public int addSchedule(javax.management.ObjectName pProvider,
                       javax.management.ObjectName pTarget,
                       String pMethodName,
                       String[] pMethodSignature,
                       Date pStartDate,
                       long pPeriod,
                       int pRepetitions)
Adds a new Schedule to the Scheduler

Parameters:
pTarget - Object Name of the Target MBean
pMethodName - Name of the method to be called
pMethodSignature - List of Attributes of the method to be called where ...
pStartDate - Date when the schedule is started
pRepetitions - Initial Number of repetitions
Returns:
Identification of the Schedule used later to remove it if necessary

removeSchedule

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

Parameters:
pIdentification - Identification returned by addSchedule() or getSchedules().

isStartAtStartup

public boolean isStartAtStartup()

setStartAtStartup

public void setStartAtStartup(boolean pStartAtStartup)
Set the scheduler to start when MBean started or not. Note that this method only affects when the startService() gets called (normally at startup time.

Parameters:
pStartAtStartup - True if Schedule has to be started at startup time

getTimerName

public String getTimerName()

setTimerName

public void setTimerName(String pTimerName)


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