|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ScheduleEntry
A single schedulable entry of a scheduling block
.
Each iteration is considered to be a separately schedulable event and is
represented by an instance of this class.
Version Info:
$Revision$ |
$Date$ |
$Author$ (last person to modify) |
Method Summary | |
---|---|
EventStatus |
getExecutionStatus()
Returns information about where this entry is in its life cycle. |
Date |
getExecutionStatusChangeDate()
Returns the point in time when this entry's status changed to its current value. |
SchedulingBlock |
getSchedulingBlock()
The scheduling block from which this entry was created. |
String |
toXml()
Returns an XML representation of this entry. |
void |
updateStatusCancel()
Cancels this entry so that it will never be executed or rescheduled. |
void |
updateStatusComplete()
Brings this entry to a successful completion. |
void |
updateStatusExecute()
Executes this entry. |
void |
updateStatusFail()
Indicates that an execution in progress failed to complete. |
void |
updateStatusHold()
Removes this entry from the schedule, with the intention of doing so temporarily. |
void |
updateStatusRelease()
Releases this entry from the on-hold state so that it may be rescheduled. |
void |
updateStatusReschedule()
Puts this entry back in the not-yet-scheduled state, thereby making it available for rescheduling. |
void |
updateStatusSchedule()
Schedules this entry to be executed at the given time. |
void |
updateStatusSubmit()
Submits this entry for scheduling. |
void |
writeAsXmlTo(Writer writer)
Writes an XML representation of this entry to writer . |
Method Detail |
---|
SchedulingBlock getSchedulingBlock()
EventStatus getExecutionStatus()
Date getExecutionStatusChangeDate()
void updateStatusSubmit() throws IllegalTransitionException
This method is called on an entry that has just been made ready for scheduling. Typically such an entry has a status of not-ready-for-scheduling. This method will change the entry's status to not-yet-scheduled.
(The reason for the new updateStatus prefix is two fold. First, it is meant to indicate that we're not truly performing the action that the final verb indicates; only a controller of this model can really do that. The model does, though, ensure the transition is legal and may update more things than just a status property. The second reason is that using a common prefix puts all status-altering methods next to each other in an alphabetical listing. We could have collapsed these into one method with a parameter, but the EventStatus and EventSetStatus enumeration elements do not map one-to-one with these methods.)
IllegalTransitionException
- if this entry is not in a state where it may be submitted for scheduling.
For example, it would be illegal to schedule an entry
that has already been canceled.void updateStatusSchedule() throws IllegalTransitionException
This method may be called on an entry that has already been scheduled if the client wishes to change the time at which it should be executed.
See updateStatusSubmit()
for an explanation of the new
updateStatus prefix.
futureTime
- the time at which the entry should be executed.
IllegalTransitionException
- if this entry is not in a state where it may be scheduled.
For example, it would be illegal to schedule an entry
that has already been executed.#reschedule()
void updateStatusExecute() throws IllegalTransitionException
This method is called on an entry that has been scheduled but has not yet been executed.
See updateStatusSubmit()
for an explanation of the new
updateStatus prefix.
IllegalTransitionException
- if this entry is not in the scheduled-but-not-started state.void updateStatusComplete() throws IllegalTransitionException
This method is called on an entry that has was most recently in the in-progress state.
See updateStatusSubmit()
for an explanation of the new
updateStatus prefix.
IllegalTransitionException
- if this entry is not currently in-progress.void updateStatusFail() throws IllegalTransitionException
This method is called on an entry that has was most recently in the
in-progress state. If a human wishes to stop an in-progress entry,
the cancel
method should be used.
This method should be called by the execution process, or its proxy,
to indicate that execution failed.
IllegalTransitionException
- if this entry is not in-progress.void updateStatusCancel() throws IllegalTransitionException
See updateStatusSubmit()
for an explanation of the new
updateStatus prefix.
IllegalTransitionException
- if this entry is not in a state where it may be canceled.
For example, it would be illegal to cancel an entry
that has already been completed successfully.void updateStatusReschedule() throws IllegalTransitionException
See updateStatusSubmit()
for an explanation of the new
updateStatus prefix.
IllegalTransitionException
- if this entry is not in a state where it may be rescheduled.
Only entries that have been scheduled but not yet started
may be rescheduled.void updateStatusHold() throws IllegalTransitionException
#release()
and #cancel()
methods can take it out of the on-hold state.
See updateStatusSubmit()
for an explanation of the new
updateStatus prefix.
IllegalTransitionException
- if this entry is not in a state where it may be held.
An entry may be placed on hold only if it has not yet been
scheduled, or if it has been scheduled but not yet started.void updateStatusRelease() throws IllegalTransitionException
See updateStatusSubmit()
for an explanation of the new
updateStatus prefix.
IllegalTransitionException
- if this entry is not in a state where it may be released.
Only entries that are on hold may be released.String toXml() throws JAXBException
JAXBException
- if anything goes wrong during the conversion to XML.writeAsXmlTo(Writer)
void writeAsXmlTo(Writer writer) throws JAXBException
writer
.
writer
- the device to which XML is written.
JAXBException
- if anything goes wrong during the conversion to XML.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |