org.clazzes.util.sched
Interface IJobStatus

All Known Subinterfaces:
IJobStatusWithCallback<C>

public interface IJobStatus

A status for an individual job.


Method Summary
 Throwable getException()
           
 long getFinishedMillis()
           
 Object getResult()
           
 boolean isCancelled()
           
 boolean isDone()
           
 

Method Detail

isCancelled

boolean isCancelled()
Returns:
wether this job was cancelled before it completed normally.

isDone

boolean isDone()
Returns:
Returns wether this job has already completed --- either due to normal termination, an exception or cancellation. In the rare circumstance, that an ITimedJob has been never been started, this method return true and getFinishedMillis() returns -1.

getResult

Object getResult()
Returns:
the result of the job, after it has completed. If it has not yet terminated, or terminated with an exception, or terminated without result, null is returned.

getException

Throwable getException()
Returns:
the exception, if the job has terminated with an exception. Returns null if the job runs, or completed without exception.

getFinishedMillis

long getFinishedMillis()
Returns:
when the job has finished, or -1 if it has not yet finished. In the rare circumstance, that an ITimedJob has never been started, this method return -1 and isDone() returns true.


Copyright © 2013. All Rights Reserved.