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

## com.developmentontheedge.jobcontrol
Interface JobControl

All Superinterfaces:
  java.lang.Runnable

All Known Implementing Classes:
  AbstractJobControl

public interface JobControl
extends java.lang.Runnable

JobControl is the special interface for providing of any control. Based on ideas of BSA JobControl interface AnalysisState

Field Summary
`static int` | `COMPLETED` The instance has completed execution.
`static int` | `CREATED` Instance has been created but not yet executed.
`static int` | `PAUSED` The analysis instance is paused.
`static int` | `RUNNING` The analysis instance is runned.
`static int` | `TERMINATED_BY_ERROR` The instance terminated due to an error.
`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
`java.lang.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

### CREATED

    public static final int CREATED

  Instance has been created but not yet executed.

  See Also:
    Constant Field Values

### RUNNING

    public static final int RUNNING

  The analysis instance is runned.

  See Also:
    Constant Field Values

### PAUSED

    public static final int PAUSED

  The analysis instance is paused.

  See Also:
    Constant Field Values

### COMPLETED

    public static final int COMPLETED

  The instance has completed execution.

  See Also:
    Constant Field Values

### TERMINATED_BY_REQUEST

    public static final int TERMINATED_BY_REQUEST

  The instance was terminated by user request.

  See Also:
    Constant Field Values

### TERMINATED_BY_ERROR

    public static final int TERMINATED_BY_ERROR

  The instance terminated due to an error.

  See Also:
    Constant Field Values

Method Detail

### pause

    public void pause()

  Pauses JobControl process

### resume

    public void resume()

  Resumes JobControl process

### terminate

    public void terminate()

  Terminates JobControl process

### 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 java.lang.String getTextStatus()

  Returns string representation of Job status

### getPreparedness

    public int getPreparedness()

  Returns preparedness of Job in percent

  Returns:
    percent value

### getCreatedTime

    public long getCreatedTime()

  Returns JobControl created time.

  Returns:
    unix format time

### getRemainedTime

    public long getRemainedTime()

  Returns estimated remained time

  Returns:
    unix format time

### getElapsedTime

    public long getElapsedTime()

  Returns elapsed time of Job

  Returns:
    unix format time

### getStartedTime

    public long getStartedTime()

  Returns Job start time

  Returns:
    unix format time

### getEndedTime

    public long getEndedTime()

  Returns Job finished time

  Returns:
    unix format time

### addListener

    public void addListener(JobControlListener listener)

  Adds JobControlListener object

  Parameters:
    `listener` - added listener

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

Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.