# Class: Term

## vertx-shell-js/term~ Term

#### new Term()

The terminal.

Source:
  - vertx-shell-js/term.js, line 33

### Methods

#### close()

Close the connection to terminal.

Source:
  - vertx-shell-js/term.js, line 200

#### closeHandler(handler) → {Term}

Set a handler that will be called when the terminal is closed.

##### Parameters:

Name | Type | Description
--- | --- | ---
`handler` | function | the handler

Source:
  - vertx-shell-js/term.js, line 186

##### Returns:

a reference to this, so the API can be used fluently

Type
  Term

#### echo(text) → {Term}

Echo some text in the terminal, escaped if necessary.

##### Parameters:

Name | Type | Description
--- | --- | ---
`text` | string | the text to echo

Source:
  - vertx-shell-js/term.js, line 104

##### Returns:

a reference to this, so the API can be used fluently

Type
  Term

#### interruptHandler(handler) → {Term}

Set an interrupt signal handler on the term.

##### Parameters:

Name | Type | Description
--- | --- | ---
`handler` | SignalHandler | the interrupt handler

Source:
  - vertx-shell-js/term.js, line 133

##### Returns:

a reference to this, so the API can be used fluently

Type
  Term

#### lastAccessedTime() → {number}

Source:
  - vertx-shell-js/term.js, line 90

##### Returns:

- the last time this term received input
- Type
    number

#### readline(prompt, lineHandler, completionHandler)

Prompt the user a line of text, providing a completion handler to handle user's completion.

##### Parameters:

Name | Type | Description
--- | --- | ---
`prompt` | string | the displayed prompt
`lineHandler` | function | the line handler called with the line
`completionHandler` | function | the completion handler

Source:
  - vertx-shell-js/term.js, line 164

#### resizehandler(handler) → {Term}

##### Parameters:

Name | Type | Description
--- | --- | ---
`handler` | function |

Source:
  - vertx-shell-js/term.js, line 45

##### Returns:

Type
  Term

#### setSession(session) → {Term}

Associate the term with a session.

##### Parameters:

Name | Type | Description
--- | --- | ---
`session` | Session | the session to set

Source:
  - vertx-shell-js/term.js, line 119

##### Returns:

a reference to this, so the API can be used fluently

Type
  Term

#### stdinHandler(handler) → {Term}

##### Parameters:

Name | Type | Description
--- | --- | ---
`handler` | function |

Source:
  - vertx-shell-js/term.js, line 59

##### Returns:

Type
  Term

#### suspendHandler(handler) → {Term}

Set a suspend signal handler on the term.

##### Parameters:

Name | Type | Description
--- | --- | ---
`handler` | SignalHandler | the suspend handler

Source:
  - vertx-shell-js/term.js, line 148

##### Returns:

a reference to this, so the API can be used fluently

Type
  Term

#### write(data) → {Term}

##### Parameters:

Name | Type | Description
--- | --- | ---
`data` | string |

Source:
  - vertx-shell-js/term.js, line 75

##### Returns:

Type
  Term