Sun Adapter for TCP/IP HL7

com.stc.connector.tcpip.model.schedule
Class RepeatedSchedule

java.lang.Object
  extended by com.stc.connector.tcpip.model.schedule.RepeatedSchedule
All Implemented Interfaces:
Schedule

public class RepeatedSchedule
extends java.lang.Object
implements Schedule

A simple implementation for repeated schedule.

Version:
cvs revision: $Revision: 1.5 $ Last Modified: $Date: 2008/03/03 15:36:00 $
Author:
Harry Liu

Field Summary
static java.lang.String version
           
 
Fields inherited from interface com.stc.connector.tcpip.model.schedule.Schedule
TYPE_ONETIME, TYPE_REPEATED
 
Constructor Summary
RepeatedSchedule(java.util.Date startTime, long delay, long repeatPeriod, boolean atFixedRate)
          Constructor for RepeatedSchedule.
 
Method Summary
 long getDelay()
          Method getDelay.
 long getRepeatPeriod()
          Method getRepeatPeriod.
 java.util.Date getStartTime()
          Method getStartTime.
 boolean isFixedRate()
          Method isFixedRate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

version

public static final java.lang.String version
See Also:
Constant Field Values
Constructor Detail

RepeatedSchedule

public RepeatedSchedule(java.util.Date startTime,
                        long delay,
                        long repeatPeriod,
                        boolean atFixedRate)
                 throws java.lang.IllegalArgumentException
Constructor for RepeatedSchedule. The repeatPeriod should be greater than zero.

Parameters:
startTime - Date, null means the parameter delay will be used.
delay - long
repeatPeriod - long
atFixedRate - boolean
Throws:
java.lang.IllegalArgumentException - on error
Method Detail

getStartTime

public java.util.Date getStartTime()
Description copied from interface: Schedule
Method getStartTime.

Specified by:
getStartTime in interface Schedule
Returns:
Date
See Also:
Schedule.getStartTime()

getDelay

public long getDelay()
Description copied from interface: Schedule
Method getDelay.

Specified by:
getDelay in interface Schedule
Returns:
long
See Also:
Schedule.getDelay()

getRepeatPeriod

public long getRepeatPeriod()
Description copied from interface: Schedule
Method getRepeatPeriod. Negative value means one-time (non repeated) schedule.

Specified by:
getRepeatPeriod in interface Schedule
Returns:
long
See Also:
Schedule.getRepeatPeriod()

isFixedRate

public boolean isFixedRate()
Description copied from interface: Schedule
Method isFixedRate. It is only for repeated schedule.

Specified by:
isFixedRate in interface Schedule
Returns:
boolean
See Also:
Schedule.isFixedRate()

Sun Adapter for TCP/IP HL7