Oracle Containers for J2EE Job Scheduler Java API Reference
10g Release 3 (10.1.3)

B16026-01

oracle.ias.scheduler
Class IntervalSchedule

java.lang.Object
  extended byoracle.ias.scheduler.Schedule
      extended byoracle.ias.scheduler.RepeatingSchedule
          extended byoracle.ias.scheduler.IntervalSchedule
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public final class IntervalSchedule
extends RepeatingSchedule

Repeating interval schedule used to specify how often a timer expiration notification is sent to the associated trigger. The interval specifies the duration between the start of subsequent executions.

See Also:
Serialized Form

Field Summary
static long EVERY_DAY
          constant used to specify an interval occurring every day
static long EVERY_HOUR
          constant used to specify an interval occurring every hour
static long EVERY_WEEK
          constant used to specify an interval occurring every week
 
Fields inherited from class oracle.ias.scheduler.RepeatingSchedule
m_endDate, m_fixedDelay
 
Fields inherited from class oracle.ias.scheduler.Schedule
m_expirationDate
 
Constructor Summary
IntervalSchedule()
          Construct a new Schedule with the default expiration and interval.
 
Method Summary
 boolean equals(java.lang.Object v)
          Indicates whether some object is "equal to" this one.
 java.util.Calendar expected(java.util.Calendar date)
          Gets the expected expiration date for this schedule for the date specified.
 long getInterval()
          Gets the interval in milliseconds.
static int getVersion()
          Internal use only.
 int hashCode()
          Returns a hash code value for the schedule.
 boolean isRepeating()
          Used to identify a repeating schedule.
 java.util.Calendar next(java.util.Calendar date)
          Gets the next expiration date for this schedule from the date specified.
 void readExternal(java.io.ObjectInput in)
          Restores the contents of this object from the stream specified.
 void setInterval(long millis)
          Sets the interval to the millisecond interval specified.
 java.lang.String toString()
          Gets the string representation of this repeating schedule.
 void writeExternal(java.io.ObjectOutput out)
          Saves the contents of this object to the stream specified.
 
Methods inherited from class oracle.ias.scheduler.RepeatingSchedule
getEndDate, isFixedDelay, setEndDate, setFixedDelay
 
Methods inherited from class oracle.ias.scheduler.Schedule
getExpiration, setExpiration, setExpiration
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EVERY_HOUR

public static final long EVERY_HOUR
constant used to specify an interval occurring every hour

See Also:
Constant Field Values

EVERY_DAY

public static final long EVERY_DAY
constant used to specify an interval occurring every day

See Also:
Constant Field Values

EVERY_WEEK

public static final long EVERY_WEEK
constant used to specify an interval occurring every week

See Also:
Constant Field Values
Constructor Detail

IntervalSchedule

public IntervalSchedule()
Construct a new Schedule with the default expiration and interval.

Method Detail

setInterval

public void setInterval(long millis)
                 throws InvalidArgumentException
Sets the interval to the millisecond interval specified.

Parameters:
millis - The interval in milliseconds between expiration.
Throws:
InvalidArgumentException - if the value specified is less than or equal to zero.

getInterval

public long getInterval()
Gets the interval in milliseconds. If an interval was not specified returns the value zero.

Returns:
number of milliseconds in the interval.

isRepeating

public boolean isRepeating()
Used to identify a repeating schedule.

Overrides:
isRepeating in class Schedule
Returns:
true if the interval is non-zero, false otherwise.
See Also:
IntervalSchedule, oracle.ias.scheduler.CronIntervalSchedule

next

public java.util.Calendar next(java.util.Calendar date)
Gets the next expiration date for this schedule from the date specified.

Overrides:
next in class Schedule
Parameters:
date - from which the next expiration is calculated
Returns:
date of next expiration or null when the schedule is non-repeating or the resultant date occurs after the end date if applicable.
See Also:
IntervalSchedule, RecurSchedule

expected

public java.util.Calendar expected(java.util.Calendar date)
Gets the expected expiration date for this schedule for the date specified.

Overrides:
expected in class Schedule
Parameters:
date - from which the expected expiration is calculated
Returns:
expected expiration or null if the schedule is fixed-delay.

toString

public java.lang.String toString()
Gets the string representation of this repeating schedule. The representation includes an initial expiration date and, if a repeat interval was specified, the interval expressed in units of years, months, weeks, days, hours, minutes, seconds, and milliseconds.

Overrides:
toString in class Schedule
Returns:
string representation of schedule
See Also:
Schedule.toString()

hashCode

public int hashCode()
Returns a hash code value for the schedule.

Overrides:
hashCode in class Schedule

equals

public boolean equals(java.lang.Object v)
Indicates whether some object is "equal to" this one.

Overrides:
equals in class Schedule

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Saves the contents of this object to the stream specified.

Specified by:
writeExternal in interface java.io.Externalizable
Overrides:
writeExternal in class Schedule
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Restores the contents of this object from the stream specified.

Specified by:
readExternal in interface java.io.Externalizable
Overrides:
readExternal in class Schedule
Throws:
java.io.IOException
java.lang.ClassNotFoundException

getVersion

public static int getVersion()
Internal use only.


Oracle Containers for J2EE Job Scheduler Java API Reference
10g Release 3 (10.1.3)

B16026-01

Copyright © 2006, Oracle. All rights reserved.