edu.ksu.cis.cadena.core.queue
Interface IModelChangeAction

All Known Implementing Classes:
AbstractModelChangeAction

public interface IModelChangeAction


Method Summary
 void completed()
          Called by the queue after an has successfully completed
 java.lang.Exception getException()
          Gets the exception that occured during execution.
 ModelChangeQueue getQueue()
          Gets the queue that this action is contained within.
 void run()
          Run the action.
 void setException(java.lang.Exception exception)
          This is set by the ModelChangeQueue if an exception was caught while executing this action.
 void setQueue(ModelChangeQueue queue)
          Called by ModelChangeQueue when it is added to a queue or removed from a queue.
 void started()
          Called by the queue directly before the action is started
 void waitForExecution()
          Waits for the action to be run by the containing queue.
 

Method Detail

run

void run()
Run the action. This should be called by ModelChangeQueue


setException

void setException(java.lang.Exception exception)
This is set by the ModelChangeQueue if an exception was caught while executing this action.

Parameters:
exception - The exception.

getException

java.lang.Exception getException()
Gets the exception that occured during execution. If no exception occured during execution, null is returned.

Returns:
The exception.
See Also:
setException(java.lang.Exception)

setQueue

void setQueue(ModelChangeQueue queue)
Called by ModelChangeQueue when it is added to a queue or removed from a queue.

Parameters:
queue - The queue it was added to.

getQueue

ModelChangeQueue getQueue()
Gets the queue that this action is contained within.

Returns:
The queue that the action is in. Returns null if the action has not been added to a queue, or the action has already run.

waitForExecution

void waitForExecution()
Waits for the action to be run by the containing queue. Returns immeadiately if the action has not been added to a queue, or if it has already ran.


completed

void completed()
Called by the queue after an has successfully completed


started

void started()
Called by the queue directly before the action is started