Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ShellServer

The shell server.

A shell server is associated with a collection of : the {@link ShellServer#registerTermServer} method registers a term server. Term servers life cycle are managed by this server.

When a receives an incoming connection, a instance is created and associated with this connection.

The {@link ShellServer#createShell} method can be used to create instance for testing purposes.

Hierarchy

  • ShellServer

Index

Methods

close

  • close(): PromiseLike<void>
  • close(completionHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): void
  • Close the shell server, this is an asynchronous close.

    Returns PromiseLike<void>

  • Close the shell server, this is an asynchronous close.

    Parameters

    • completionHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>

    Returns void

createShell

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

    Parameters

    Returns Shell

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

    Returns Shell

listen

  • listen(): PromiseLike<void>
  • listen(listenHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): ShellServer
  • Start the shell service, this is an asynchronous start.

    Returns PromiseLike<void>

  • Start the shell service, this is an asynchronous start.

    Parameters

    • listenHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>

    Returns ShellServer

registerCommandResolver

  • Register a command resolver for this server.

    Parameters

    Returns ShellServer

registerTermServer

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

    Parameters

    Returns ShellServer

shellHandler

  • shellHandler(shellHandler: ((res: Shell) => void) | Handler<Shell>): void
  • Called when a new shell is created. Can be used to prepopulate the shell session with objects or set the prompt.

    Parameters

    • shellHandler: ((res: Shell) => void) | Handler<Shell>

    Returns void

Static create

  • Create a new shell server with default options.

    Parameters

    Returns ShellServer

  • Create a new shell server with specific options.

    Parameters

    • vertx: Vertx

    Returns ShellServer

Generated using TypeDoc