io.vertx.reactivex.ext.shell

## Class ShellServer

- java.lang.Object
- - io.vertx.reactivex.ext.shell.ShellServer

-     public class ShellServer
      extends Object

  The shell server.

  A shell server is associated with a collection of : the `registerTermServer(io.vertx.reactivex.ext.shell.term.TermServer)` 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 `createShell(io.vertx.reactivex.ext.shell.term.Term)` method can be used to create instance for testing purposes.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<ShellServer>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ShellServer(Object delegate)`
    `ShellServer(ShellServer delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Close the shell server, this is an asynchronous close.
    `void` | `close(Handler<AsyncResult<Void>> completionHandler)` Close the shell server, this is an asynchronous close.
    `static ShellServer` | `create(Vertx vertx)` Create a new shell server with specific options.
    `static ShellServer` | `create(Vertx vertx, ShellServerOptions options)` Create a new shell server with default options.
    `Shell` | `createShell()` Create a new shell, the returned shell should be closed explicitely.
    `Shell` | `createShell(Term term)` Create a new shell, the returned shell should be closed explicitely.
    `boolean` | `equals(Object o)`
    `ShellServer` | `getDelegate()`
    `int` | `hashCode()`
    `ShellServer` | `listen()` Start the shell service, this is an asynchronous start.
    `ShellServer` | `listen(Handler<AsyncResult<Void>> listenHandler)` Start the shell service, this is an asynchronous start.
    `static ShellServer` | `newInstance(ShellServer arg)`
    `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.
    `Completable` | `rxClose()` Close the shell server, this is an asynchronous close.
    `Completable` | `rxListen()` Start the shell service, this is an asynchronous start.
    `void` | `shellHandler(Handler<Shell> shellHandler)` Called when a new shell is created.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<ShellServer> __TYPE_ARG

  - ### Constructor Detail

    - #### ShellServer

          public ShellServer(ShellServer delegate)

    - #### ShellServer

          public ShellServer(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public ShellServer getDelegate()

    - #### create

          public static ShellServer create(Vertx vertx,
                                           ShellServerOptions options)

      Create a new shell server with default options.
      Parameters:
        `vertx` - the vertx
        `options` - the options
      Returns:
        the created shell server

    - #### create

          public static ShellServer create(Vertx vertx)

      Create a new shell server with specific options.
      Parameters:
        `vertx` - the vertx
      Returns:
        the created shell server

    - #### registerCommandResolver

          public ShellServer registerCommandResolver(CommandResolver resolver)

      Register a command resolver for this server.
      Parameters:
        `resolver` - the resolver
      Returns:
        a reference to this, so the API can be used fluently

    - #### registerTermServer

          public ShellServer registerTermServer(TermServer termServer)

      Register a term server to this shell server, the term server lifecycle methods are managed by this shell server.
      Parameters:
        `termServer` - the term server to add
      Returns:
        a reference to this, so the API can be used fluently

    - #### createShell

          public Shell createShell(Term term)

      Create a new shell, the returned shell should be closed explicitely.
      Parameters:
        `term` - the shell associated terminal
      Returns:
        the created shell

    - #### createShell

          public Shell createShell()

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

    - #### listen

          public ShellServer listen(Handler<AsyncResult<Void>> listenHandler)

      Start the shell service, this is an asynchronous start.
      Parameters:
        `listenHandler` - handler for getting notified when service is started
      Returns:

    - #### listen

          public ShellServer listen()

      Start the shell service, this is an asynchronous start.
      Returns:

    - #### rxListen

          public Completable rxListen()

      Start the shell service, this is an asynchronous start.
      Returns:

    - #### close

          public void close(Handler<AsyncResult<Void>> completionHandler)

      Close the shell server, this is an asynchronous close.
      Parameters:
        `completionHandler` - handler for getting notified when service is stopped

    - #### close

          public void close()

      Close the shell server, this is an asynchronous close.

    - #### rxClose

          public Completable rxClose()

      Close the shell server, this is an asynchronous close.
      Returns:

    - #### shellHandler

          public void shellHandler(Handler<Shell> shellHandler)

      Called when a new shell is created. Can be used to prepopulate the shell session with objects or set the prompt.
      Parameters:
        `shellHandler` - handler for getting notified when the server creates a new shell.

    - #### newInstance

          public static ShellServer newInstance(ShellServer arg)

Copyright © 2021 Eclipse. All rights reserved.