Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.varia.scheduler
Class XMLScheduleProvider

    java.lang.Object
      org.jboss.mx.util.JBossNotificationBroadcasterSupport
          org.jboss.system.ServiceMBeanSupport
              org.jboss.ha.jmx.HAServiceMBeanSupport
                  org.jboss.ha.singleton.HASingletonSupport
                      org.jboss.varia.scheduler.AbstractScheduleProvider
                          org.jboss.varia.scheduler.XMLScheduleProvider

All Implemented Interfaces:
  AbstractScheduleProviderMBean, org.jboss.ha.jmx.HAServiceMBean, org.jboss.ha.singleton.HASingleton, org.jboss.ha.singleton.HASingletonMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.jboss.system.Service, org.jboss.system.ServiceMBean, XMLScheduleProviderMBean

public class XMLScheduleProvider
extends AbstractScheduleProvider
implements XMLScheduleProviderMBean

This Provider get its Scheduler from a XML configuration string allowing the administrator to add several Schedules with one provider. The "Schedules" properties has to look like:

Version:
  $Revision: 1.3 $
Author:
  Andreas Schaefer

Field Summary

Fields inherited from class org.jboss.system.ServiceMBeanSupport
`log, server, SERVICE_CONTROLLER_SIG, serviceName`

Fields inherited from interface org.jboss.varia.scheduler.XMLScheduleProviderMBean
`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`

Constructor Summary
`XMLScheduleProvider()` Default (no-args) Constructor

Method Summary
`protected Text` | `getNode(NodeList pList, String pName)` Loops of the given Node List and looks for the Element with the given Node Name
`javax.management.ObjectName` | `getObjectName(javax.management.MBeanServer pServer, javax.management.ObjectName pName)`
`Element` | `getSchedules()`
`protected String[]` | `getSignature(String pMethodSignature)` Converts a string of method arguments (separated by colons) into an array of string
`protected Date` | `getStartDate(String pStartDate, String dateFormat)` Converts the given Data string to a date where not value means 1/1/1970, "NOW" means now (plus a second), an long value means time in milliseconds since 1/1/1970 and a String is a Date string which is intepreted by a Simple Data Formatter.
`void` | `setSchedules(Element pSchedules)` Sets the XML configuration attribute
`void` | `startProviding()` Add the Schedule to the Schedule Manager
`void` | `stopProviding()` Stops the Provider from providing causing the provider to remove the Schedule

Methods inherited from class org.jboss.varia.scheduler.AbstractScheduleProvider
`addSchedule, getScheduleManagerName, isHASingleton, removeSchedule, setHASingleton, setScheduleManagerName, startScheduleProviderService, startService, startSingleton, stopScheduleProviderService, stopService, stopSingleton`

Methods inherited from class org.jboss.ha.singleton.HASingletonSupport
`_stopOldMaster, isMasterNode, makeThisNodeMaster, partitionTopologyChanged`

Methods inherited from class org.jboss.ha.jmx.HAServiceMBeanSupport
`_receiveRemoteNotification, callAsyncMethodOnPartition, callMethodOnPartition, callMethodOnPartition, findHAPartitionWithName, getDistributedState, getPartition, getPartitionName, getServiceHAName, isDRMMasterReplica, registerDRMListener, registerRPCHandler, sendNotification, sendNotificationRemote, sendNotificationToLocalListeners, setDistributedState, setPartitionName, setupPartition, unregisterDRMListener, unregisterRPCHandler`

Methods inherited from class org.jboss.system.ServiceMBeanSupport
`create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, 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, removeNotificationListener, removeNotificationListener`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.jboss.varia.scheduler.AbstractScheduleProviderMBean
`getScheduleManagerName, isHASingleton, setHASingleton, setScheduleManagerName`

Methods inherited from interface org.jboss.ha.singleton.HASingletonMBean
`isMasterNode`

Methods inherited from interface org.jboss.ha.jmx.HAServiceMBean
`callMethodOnPartition, getDistributedState, getPartitionName, sendNotification, setDistributedState, setPartitionName`

Methods inherited from interface org.jboss.system.ServiceMBean
`getName, getState, getStateString, jbossInternalLifecycle`

Methods inherited from interface org.jboss.system.Service
`create, destroy, start, stop`

Methods inherited from interface javax.management.NotificationBroadcaster
`addNotificationListener, getNotificationInfo, removeNotificationListener`

Constructor Detail

### XMLScheduleProvider

    public XMLScheduleProvider()

  Default (no-args) Constructor

Method Detail

### getSchedules

    public Element getSchedules()

  Specified by:
    `getSchedules` in interface `XMLScheduleProviderMBean`
  Returns:
    XML configuration attribute

### setSchedules

    public void setSchedules(Element pSchedules)

  Sets the XML configuration attribute

  Specified by:
    `setSchedules` in interface `XMLScheduleProviderMBean`

### startProviding

    public void startProviding()
                        throws Exception

  Add the Schedule to the Schedule Manager

  Specified by:
    `startProviding` in interface `XMLScheduleProviderMBean`
  Specified by:
    `startProviding` in class `AbstractScheduleProvider`
  Throws:
    `Exception`

### getNode

    protected Text getNode(NodeList pList,
                           String pName)

  Loops of the given Node List and looks for the Element with the given Node Name

  Parameters:
    `pName` - The name of the node to look for
  Returns:
    Element if found otherwise null

### stopProviding

    public void stopProviding()

  Stops the Provider from providing causing the provider to remove the Schedule

  Specified by:
    `stopProviding` in interface `XMLScheduleProviderMBean`
  Specified by:
    `stopProviding` in class `AbstractScheduleProvider`

### getSignature

    protected String[] getSignature(String pMethodSignature)

  Converts a string of method arguments (separated by colons) into an array of string

### getStartDate

    protected Date getStartDate(String pStartDate,
                                String dateFormat)

  Converts the given Data string to a date where not value means 1/1/1970, "NOW" means now (plus a second), an long value means time in milliseconds since 1/1/1970 and a String is a Date string which is intepreted by a Simple Data Formatter.

  Parameters:
    `pStartDate` - the date
    `dateFormat` - the dateFormat, the locale is is used when null or blank

### getObjectName

    public javax.management.ObjectName getObjectName(javax.management.MBeanServer pServer,
                                                     javax.management.ObjectName pName)
                                              throws javax.management.MalformedObjectNameException

  Throws:
    `javax.management.MalformedObjectNameException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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