Package: io.vertx.groovy.ext.shell.term

## [Groovy] Class TermServer

- io.vertx.groovy.ext.shell.term.TermServer

- A server for terminal based applications.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `TermServer (java.lang.Object delegate)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `int` | `actualPort()` The actual port the server is listening on.
    `TermServer` | `authProvider(AuthProvider provider)` Set an auth provider to use, any provider configured in options will override this provider.
    `void` | `close()` Close the server.
    `void` | `close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> completionHandler)` Like TermServer.close but supplying a handler that will be notified when close is complete.
    `static TermServer` | `createHttpTermServer(Vertx vertx)` Create a term server for the HTTP protocol.
    `static TermServer` | `createHttpTermServer(Vertx vertx, java.util.Map<java.lang.String, java.lang.Object> options)` Create a term server for the HTTP protocol.
    `static TermServer` | `createHttpTermServer(Vertx vertx, Router router)` Create a term server for the HTTP protocol, using an existing router.
    `static TermServer` | `createHttpTermServer(Vertx vertx, Router router, java.util.Map<java.lang.String, java.lang.Object> options)` Create a term server for the HTTP protocol, using an existing router.
    `static TermServer` | `createSSHTermServer(Vertx vertx)` Create a term server for the SSH protocol.
    `static TermServer` | `createSSHTermServer(Vertx vertx, java.util.Map<java.lang.String, java.lang.Object> options)` Create a term server for the SSH protocol.
    `static TermServer` | `createTelnetTermServer(Vertx vertx)` Create a term server for the Telnet protocol.
    `static TermServer` | `createTelnetTermServer(Vertx vertx, java.util.Map<java.lang.String, java.lang.Object> options)` Create a term server for the Telnet protocol.
    `java.lang.Object` | `getDelegate()`
    `TermServer` | `listen()` Bind the term server, the TermServer.termHandler must be set before.
    `TermServer` | `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<TermServer>> listenHandler)` Bind the term server, the TermServer.termHandler must be set before.
    `TermServer` | `termHandler(io.vertx.core.Handler<Term> handler)` Set the term handler that will receive incoming client connections.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Constructor Detail

    - #### TermServer(java.lang.Object delegate)

  - ### Method Detail

    - #### int actualPort()

      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

      Returns:
        the actual port the server is listening on.

    - #### TermServer authProvider(AuthProvider provider)

      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.

      Returns:
        this object
      Parameters:
        `provider` - the auth to use

    - #### void close()

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

    - #### void close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> completionHandler)

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

      Parameters:
        `completionHandler` - the handler to be notified when the term server is closed

    - #### static TermServer createHttpTermServer(Vertx vertx)

      Create a term server for the HTTP protocol.

      Returns:
        the term server
      Parameters:
        `vertx` - the vertx instance

    - #### static TermServer createHttpTermServer(Vertx vertx, java.util.Map<java.lang.String, java.lang.Object> options)

      Create a term server for the HTTP protocol.

      Returns:
        the term server
      Parameters:
        `vertx` - the vertx instance
        `options` - the term options (see HttpTermOptions)

    - #### static TermServer createHttpTermServer(Vertx vertx, Router router)

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

      Returns:
        the term server
      Parameters:
        `vertx` - the vertx instance
        `router` - the router

    - #### static TermServer createHttpTermServer(Vertx vertx, Router router, java.util.Map<java.lang.String, java.lang.Object> options)

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

      Returns:
        the term server
      Parameters:
        `vertx` - the vertx instance
        `router` - the router
        `options` - the term options (see HttpTermOptions)

    - #### static TermServer createSSHTermServer(Vertx vertx)

      Create a term server for the SSH protocol.

      Returns:
        the term server
      Parameters:
        `vertx` - the vertx instance

    - #### static TermServer createSSHTermServer(Vertx vertx, java.util.Map<java.lang.String, java.lang.Object> options)

      Create a term server for the SSH protocol.

      Returns:
        the term server
      Parameters:
        `vertx` - the vertx instance
        `options` - the ssh options (see SSHTermOptions)

    - #### static TermServer createTelnetTermServer(Vertx vertx)

      Create a term server for the Telnet protocol.

      Returns:
        the term server
      Parameters:
        `vertx` - the vertx instance

    - #### static TermServer createTelnetTermServer(Vertx vertx, java.util.Map<java.lang.String, java.lang.Object> options)

      Create a term server for the Telnet protocol.

      Returns:
        the term server
      Parameters:
        `vertx` - the vertx instance
        `options` - the term options (see TelnetTermOptions)

    - #### java.lang.Object getDelegate()

    - #### TermServer listen()

      Bind the term server, the TermServer.termHandler must be set before.

      Returns:
        this object

    - #### TermServer listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<TermServer>> listenHandler)

      Bind the term server, the TermServer.termHandler must be set before.

      Returns:
        this object
      Parameters:
        `listenHandler` - the listen handler

    - #### TermServer termHandler(io.vertx.core.Handler<Term> handler)

      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.

      Returns:
        this object
      Parameters:
        `handler` - the term handler