com.sdm.quasar.client.core.dialog.services
Interface ModalBlockHelperService.JobQueue

Enclosing interface:
ModalBlockHelperService

public static interface ModalBlockHelperService.JobQueue

Defines a job queue whose work is portioned in single jobs.


Method Summary
 void doNextJob()
          Do the next job in line.
 java.lang.RuntimeException getException()
           
 boolean isFinished()
           
 boolean isOnError()
           
 

Method Detail

isFinished

public boolean isFinished()
Returns:
true if this queue is empty

doNextJob

public void doNextJob()
Do the next job in line. The implementation should be made in a way that if a block in a modal way occurs during one call the next call to this method will process correctly with the next job. That is most easily done if the statement that blocks is the last statement that is executed in this method.

The implementation should not throw a RuntimeException when an error occurs but handle the error internally so that isOnError() returns true and getException() returns the exception.


getException

public java.lang.RuntimeException getException()
Returns:
a RuntimeException occured in doNextJob() or null

isOnError

public boolean isOnError()
Returns:
true iff an RuntimeException occured in doNextJob()