# Class: ShellServer

## vertx-shell-js/shell_server~ ShellServer

#### new ShellServer()

The shell server.

Source:
  - vertx-shell-js/shell_server.js, line 35

### Methods

#### close(completionHandler)

Close the shell server, this is an asynchronous close.

##### Parameters:

Name | Type | Description
--- | --- | ---
`completionHandler` | function | handler for getting notified when service is stopped

Source:
  - vertx-shell-js/shell_server.js, line 116

#### createShell(term) → {Shell}

Create a new shell, the returned shell should be closed explicitely.

##### Parameters:

Name | Type | Description
--- | --- | ---
`term` | Term | the shell associated terminal

Source:
  - vertx-shell-js/shell_server.js, line 77

##### Returns:

the created shell

Type
  Shell

#### listen(listenHandler) → {ShellServer}

Start the shell service, this is an asynchronous start.

##### Parameters:

Name | Type | Description
--- | --- | ---
`listenHandler` | function | handler for getting notified when service is started

Source:
  - vertx-shell-js/shell_server.js, line 93

##### Returns:

Type
  ShellServer

#### registerCommandResolver(resolver) → {ShellServer}

Register a command resolver for this server.

##### Parameters:

Name | Type | Description
--- | --- | ---
`resolver` | CommandResolver | the resolver

Source:
  - vertx-shell-js/shell_server.js, line 47

##### Returns:

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

Type
  ShellServer

#### registerTermServer(termServer) → {ShellServer}

Register a term server to this shell server, the term server lifecycle methods are managed by this shell server.

##### Parameters:

Name | Type | Description
--- | --- | ---
`termServer` | TermServer | the term server to add

Source:
  - vertx-shell-js/shell_server.js, line 62

##### Returns:

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

Type
  ShellServer