Class NettyTelnetBootstrap
java.lang.Object
org.aesh.terminal.telnet.TelnetBootstrap
org.aesh.terminal.telnet.netty.NettyTelnetBootstrap
Netty-based implementation of the TelnetBootstrap for starting a Telnet server.
- Author:
- Julien Viet
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new NettyTelnetBootstrap with default NIO event loop group. -
Method Summary
Modifier and TypeMethodDescriptionSets the host address the server will bind to.setPort(int port) Sets the port number the server will listen on.voidstart(Supplier<TelnetHandler> factory, Consumer<Throwable> doneHandler) Start the telnet servervoidStops the telnet server with a callback handler.Methods inherited from class TelnetBootstrap
getHost, getPort, start, stop
-
Constructor Details
-
NettyTelnetBootstrap
public NettyTelnetBootstrap()Creates a new NettyTelnetBootstrap with default NIO event loop group.
-
-
Method Details
-
setHost
Sets the host address the server will bind to.- Overrides:
setHostin classTelnetBootstrap- Parameters:
host- the host address- Returns:
- this bootstrap instance for method chaining
-
setPort
Sets the port number the server will listen on.- Overrides:
setPortin classTelnetBootstrap- Parameters:
port- the port number- Returns:
- this bootstrap instance for method chaining
-
start
Description copied from class:TelnetBootstrapStart the telnet server- Specified by:
startin classTelnetBootstrap- Parameters:
factory- the telnet handler factorydoneHandler- the done handler
-
stop
Description copied from class:TelnetBootstrapStops the telnet server with a callback handler.- Specified by:
stopin classTelnetBootstrap- Parameters:
doneHandler- the handler called when stop completes (with null on success, or an exception on failure)
-