# Class: JobController

## vertx-shell-js/job_controller~ JobController

#### new JobController()

The job controller.

Source:
  - vertx-shell-js/job_controller.js, line 31

### Methods

#### close(completionHandler)

Close the controller and terminate all the underlying jobs, a closed controller does not accept anymore jobs.

##### Parameters:

Name | Type | Description
--- | --- | ---
`completionHandler` | function |

Source:
  - vertx-shell-js/job_controller.js, line 97

#### createJob(process, line) → {Job}

Create a job wrapping a process.

##### Parameters:

Name | Type | Description
--- | --- | ---
`process` | Process | the process
`line` | string | the line

Source:
  - vertx-shell-js/job_controller.js, line 84

##### Returns:

the created job

Type
  Job

#### foregroundJob() → {Job}

Source:
  - vertx-shell-js/job_controller.js, line 42

##### Returns:

the current foreground job

Type
  Job

#### getJob(id) → {Job}

Returns an active job in this session by its .

##### Parameters:

Name | Type | Description
--- | --- | ---
`id` | number | the job id

Source:
  - vertx-shell-js/job_controller.js, line 69

##### Returns:

the job of when not found

Type
  Job

#### jobs() → {Array.<Job>}

Source:
  - vertx-shell-js/job_controller.js, line 55

##### Returns:

the active jobs

Type
  Array.<Job>