vertx / io.vertx.ext.shell.term / TermServer

TermServer

interface TermServer

A server for terminal based applications.

Author
Julien Viet

Functions

actualPort

abstract fun actualPort(): Int

The actual port the server is listening on. This is useful if you bound the server specifying 0 as port number signifying an ephemeral port

authProvider

abstract fun authProvider(provider: AuthProvider): TermServer

Set an auth provider to use, any provider configured in options will override this provider. This should be used when a custom auth provider should be used.

close

abstract fun close(): Unit

Close the server. This will close any currently open connections. The close may not complete until after this method has returned.

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

Like #close but supplying a handler that will be notified when close is complete.

createHttpTermServer

open static fun createHttpTermServer(vertx: Vertx): TermServer
open static fun createHttpTermServer(vertx: Vertx, options: HttpTermOptions): TermServer

Create a term server for the HTTP protocol.

open static fun createHttpTermServer(vertx: Vertx, router: Router): TermServer
open static fun createHttpTermServer(vertx: Vertx, router: Router, options: HttpTermOptions): TermServer

Create a term server for the HTTP protocol, using an existing router.

createSSHTermServer

open static fun createSSHTermServer(vertx: Vertx): TermServer
open static fun createSSHTermServer(vertx: Vertx, options: SSHTermOptions): TermServer

Create a term server for the SSH protocol.

createTelnetTermServer

open static fun createTelnetTermServer(vertx: Vertx): TermServer
open static fun createTelnetTermServer(vertx: Vertx, options: TelnetTermOptions): TermServer

Create a term server for the Telnet protocol.

listen

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

Bind the term server, the #termHandler(Handler) must be set before.

termHandler

abstract fun termHandler(handler: Handler<Term>): TermServer

Set the term handler that will receive incoming client connections. When a remote terminal connects the handler will be called with the Term which can be used to interact with the remote terminal.