Overview | Package | Class | Use | Tree | Help
| HEADER
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.developmentontheedge.jobcontrol
Interface JobControl

All Known Implementing Classes:
  AbstractJobControl

public interface JobControl
extends Runnable

Field Summary
`final static int` | `COMPLETED` The instance has completed execution.
`final static int` | `CREATED` Instance has been created but not yet executed.
`final static int` | `PAUSED` The analysis instance is paused.
`final static int` | `RUNNING` The analysis instance is runned.
`final static int` | `TERMINATED_BY_ERROR` The instance terminated due to an error.
`final static int` | `TERMINATED_BY_REQUEST` The instance was terminated by user request.

Method Summary
`void` | `addListener(JobControlListener listener)` Adds JobControlListener object
`long` | `getCreatedTime()` Returns JobControl created time.
`long` | `getElapsedTime()` Returns elapsed time of Job
`long` | `getEndedTime()` Returns Job finished time
`int` | `getPreparedness()` Returns preparedness of Job in percent
`long` | `getRemainedTime()` Returns estimated remained time
`long` | `getStartedTime()` Returns Job start time
`int` | `getStatus()` Returns status of Job
`String` | `getTextStatus()` Returns string representation of Job status
`void` | `pause()` Pauses JobControl process
`void` | `resume()` Resumes JobControl process
`void` | `terminate()` 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:
  - CREATED
  - RUNNING
  - PAUSED
  - COMPLETED
  - TERMINATED_BY_REQUEST
  - TERMINATED_BY_ERROR

### 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

Overview | Package | Class | Use | Tree | Help
| FOOTER
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

BOTTOM