HEADER

com.developmentontheedge.jobcontrol
Interface JobControl

All Known Implementing Classes:
AbstractJobControl

public interface JobControl
extends Runnable


Field Summary
 final static intCOMPLETED
          The instance has completed execution.
 final static intCREATED
          Instance has been created but not yet executed.
 final static intPAUSED
          The analysis instance is paused.
 final static intRUNNING
          The analysis instance is runned.
 final static intTERMINATED_BY_ERROR
          The instance terminated due to an error.
 final static intTERMINATED_BY_REQUEST
          The instance was terminated by user request.

Method Summary
 voidaddListener(JobControlListener listener)
          Adds JobControlListener object
 longgetCreatedTime()
          Returns JobControl created time.
 longgetElapsedTime()
          Returns elapsed time of Job
 longgetEndedTime()
          Returns Job finished time
 intgetPreparedness()
          Returns preparedness of Job in percent
 longgetRemainedTime()
          Returns estimated remained time
 longgetStartedTime()
          Returns Job start time
 intgetStatus()
          Returns status of Job
 StringgetTextStatus()
          Returns string representation of Job status
 voidpause()
          Pauses JobControl process
 voidresume()
          Resumes JobControl process
 voidterminate()
          Terminates JobControl process

Methods inherited from interface java.lang.Runnable
run

Field Detail

COMPLETED

public final static int COMPLETED
The instance has completed execution.

CREATED

public final static int CREATED
Instance has been created but not yet executed.

PAUSED

public final static int PAUSED
The analysis instance is paused.

RUNNING

public final static int RUNNING
The analysis instance is runned.

TERMINATED_BY_ERROR

public final static int TERMINATED_BY_ERROR
The instance terminated due to an error.

TERMINATED_BY_REQUEST

public final static int TERMINATED_BY_REQUEST
The instance was terminated by user request.
Method Detail

addListener

public void addListener(JobControlListener listener)
Adds JobControlListener object
Parameters:
listener - added listener

getCreatedTime

public long getCreatedTime()
Returns JobControl created time.
Returns: unix format time

getElapsedTime

public long getElapsedTime()
Returns elapsed time of Job
Returns: unix format time

getEndedTime

public long getEndedTime()
Returns Job finished time
Returns: unix format time

getPreparedness

public int getPreparedness()
Returns preparedness of Job in percent
Returns: percent value

getRemainedTime

public long getRemainedTime()
Returns estimated remained time
Returns: unix format time

getStartedTime

public long getStartedTime()
Returns Job start time
Returns: unix format time

getStatus

public int getStatus()
Returns status of Job
Returns: one of following values:

getTextStatus

public String getTextStatus()
Returns string representation of Job status

pause

public void pause()
Pauses JobControl process

resume

public void resume()
Resumes JobControl process

terminate

public void terminate()
Terminates JobControl process

FOOTER

BOTTOM