vertx / io.vertx.ext.shell / ShellServer

ShellServer

interface ShellServer

The shell server. A shell server is associated with a collection of TermServer: the #registerTermServer(TermServer) method registers a term server. Term servers life cycle are managed by this server. When a TermServer receives an incoming connection, a JobController instance is created and associated with this connection. The #createShell() method can be used to create JobController instance for testing purposes.

Author
Julien Viet

Functions

close

open fun close(): Unit
abstract fun close(completionHandler: Handler<AsyncResult<Void>>): Unit

Close the shell server, this is an asynchronous close.

create

open static fun create(vertx: Vertx, options: ShellServerOptions): ShellServer

Create a new shell server with default options.

open static fun create(vertx: Vertx): ShellServer

Create a new shell server with specific options.

createShell

abstract fun createShell(term: Term): Shell
abstract fun createShell(): Shell

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

listen

open fun listen(): ShellServer
abstract fun listen(listenHandler: Handler<AsyncResult<Void>>): ShellServer

Start the shell service, this is an asynchronous start.

registerCommandResolver

abstract fun registerCommandResolver(resolver: CommandResolver): ShellServer

Register a command resolver for this server.

registerTermServer

abstract fun registerTermServer(termServer: TermServer): ShellServer

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