org.rhq.enterprise.server.xmlschema
Class AbstractScheduleType

java.lang.Object
  extended by org.rhq.enterprise.server.xmlschema.AbstractScheduleType
Direct Known Subclasses:
CronScheduleType, PeriodicScheduleType

public abstract class AbstractScheduleType
extends java.lang.Object

Defines a type of schedule for a server plugin job. This also has a static factory that allows you to build concrete forms of schedule types.

Author:
John Mazzitelli

Constructor Summary
AbstractScheduleType(boolean concurrent, java.lang.String typeName)
          Builds the schedule type.
 
Method Summary
static AbstractScheduleType create(boolean concurrent, java.lang.String scheduleType, java.lang.String scheduleTrigger)
          Factory method that creates a concrete schedule type object based on the given parameters.
abstract  java.lang.String getScheduleTrigger()
          Returns the string form of the trigger that causes the job to be invoked.
 java.lang.String getTypeName()
          The name that identifies this type of schedule.
 boolean isConcurrent()
          If true, multiple jobs can execute at any one time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractScheduleType

public AbstractScheduleType(boolean concurrent,
                            java.lang.String typeName)
Builds the schedule type.

Parameters:
concurrent - if true, multiple jobs can run concurrently. If false, only one scheduled job will run at any one time across the RHQ Server cloud.
typeName - the name of the concrete schedule type (subclasses must provide this)
Method Detail

create

public static final AbstractScheduleType create(boolean concurrent,
                                                java.lang.String scheduleType,
                                                java.lang.String scheduleTrigger)
Factory method that creates a concrete schedule type object based on the given parameters.

Parameters:
concurrent - if true, multiple jobs can run concurrently.
scheduleType - the name of the concrete schedule type
scheduleTrigger - the string form of the schedule's trigger
Returns:
a new instance of the desired schedule type

getTypeName

public java.lang.String getTypeName()
The name that identifies this type of schedule.

Returns:
type name string

isConcurrent

public boolean isConcurrent()
If true, multiple jobs can execute at any one time. If false, only a single job will be allowed to run at any one time (across all servers in the RHQ Server cloud). Even if the schedule is triggered multiple times, if a job is still running, any future jobs that are triggered will be delayed.

Returns:
concurrent flag

getScheduleTrigger

public abstract java.lang.String getScheduleTrigger()
Returns the string form of the trigger that causes the job to be invoked.

Returns:
a string that describes the trigger of the schedule


Copyright © 2008-2009 Red Hat, Inc.. All Rights Reserved.