Package: io.vertx.groovy.ext.shell

## [Groovy] Class ShellServer

- io.vertx.groovy.ext.shell.ShellServer

- The shell server.

  A shell server is associated with a collection of : the 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 ShellServer.createShell method can be used to create instance for testing purposes.

- - ### Constructor Summary

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

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `close()` Close the shell server, this is an asynchronous close.
    `void` | `close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> completionHandler)` Close the shell server, this is an asynchronous close.
    `static ShellServer` | `create(Vertx vertx, java.util.Map<java.lang.String, java.lang.Object> options)` Create a new shell server with default options.
    `static ShellServer` | `create(Vertx vertx)` Create a new shell server with specific options.
    `Shell` | `createShell(Term term)` Create a new shell, the returned shell should be closed explicitely.
    `Shell` | `createShell()` Create a new shell, the returned shell should be closed explicitely.
    `java.lang.Object` | `getDelegate()`
    `ShellServer` | `listen()` Start the shell service, this is an asynchronous start.
    `ShellServer` | `listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> listenHandler)` Start the shell service, this is an asynchronous start.
    `ShellServer` | `registerCommandResolver(CommandResolver resolver)` Register a command resolver for this server.
    `ShellServer` | `registerTermServer(TermServer termServer)` Register a term server to this shell server, the term server lifecycle methods are managed by this shell server.

  - ### 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

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

  - ### Method Detail

    - #### void close()

      Close the shell server, this is an asynchronous close.

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

      Close the shell server, this is an asynchronous close.

      Parameters:
        `completionHandler` - handler for getting notified when service is stopped

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

      Create a new shell server with default options.

      Returns:
        the created shell server
      Parameters:
        `vertx` - the vertx
        `options` - the options (see ShellServerOptions)

    - #### static ShellServer create(Vertx vertx)

      Create a new shell server with specific options.

      Returns:
        the created shell server
      Parameters:
        `vertx` - the vertx

    - #### Shell createShell(Term term)

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

      Returns:
        the created shell
      Parameters:
        `term` - the shell associated terminal

    - #### Shell createShell()

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

      Returns:
        the created shell

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

    - #### ShellServer listen()

      Start the shell service, this is an asynchronous start.

      Returns:

    - #### ShellServer listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> listenHandler)

      Start the shell service, this is an asynchronous start.

      Returns:
      Parameters:
        `listenHandler` - handler for getting notified when service is started

    - #### ShellServer registerCommandResolver(CommandResolver resolver)

      Register a command resolver for this server.

      Returns:
        a reference to this, so the API can be used fluently
      Parameters:
        `resolver` - the resolver

    - #### ShellServer registerTermServer(TermServer termServer)

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

      Returns:
        a reference to this, so the API can be used fluently
      Parameters:
        `termServer` - the term server to add