Class NettyTelnetBootstrap

java.lang.Object
org.aesh.terminal.telnet.TelnetBootstrap
org.aesh.terminal.telnet.netty.NettyTelnetBootstrap

public class NettyTelnetBootstrap extends TelnetBootstrap
Netty-based implementation of the TelnetBootstrap for starting a Telnet server.
Author:
Julien Viet
  • Constructor Details

    • NettyTelnetBootstrap

      public NettyTelnetBootstrap()
      Creates a new NettyTelnetBootstrap with default NIO event loop group.
  • Method Details

    • setHost

      public NettyTelnetBootstrap setHost(String host)
      Sets the host address the server will bind to.
      Overrides:
      setHost in class TelnetBootstrap
      Parameters:
      host - the host address
      Returns:
      this bootstrap instance for method chaining
    • setPort

      public NettyTelnetBootstrap setPort(int port)
      Sets the port number the server will listen on.
      Overrides:
      setPort in class TelnetBootstrap
      Parameters:
      port - the port number
      Returns:
      this bootstrap instance for method chaining
    • start

      public void start(Supplier<TelnetHandler> factory, Consumer<Throwable> doneHandler)
      Description copied from class: TelnetBootstrap
      Start the telnet server
      Specified by:
      start in class TelnetBootstrap
      Parameters:
      factory - the telnet handler factory
      doneHandler - the done handler
    • stop

      public void stop(Consumer<Throwable> doneHandler)
      Description copied from class: TelnetBootstrap
      Stops the telnet server with a callback handler.
      Specified by:
      stop in class TelnetBootstrap
      Parameters:
      doneHandler - the handler called when stop completes (with null on success, or an exception on failure)