public synchronized static void main(String[] args) throws Exception { NettySshTtyBootstrap bootstrap = new NettySshTtyBootstrap().setHost("localhost").setPort(4000); bootstrap.start(EventsExample::handle).get(10, TimeUnit.SECONDS); System.out.println("Telnet server started on localhost:4000"); SshEventsExample.class.wait(); } }
public CompletableFuture<Void> stop() throws InterruptedException { CompletableFuture<Void> fut = new CompletableFuture<>(); stop(Helper.stoppedHandler(fut)); return fut; }
public CompletableFuture<Void> start(Consumer<TtyConnection> handler) throws Exception { CompletableFuture<Void> fut = new CompletableFuture<>(); start(handler, io.termd.core.util.Helper.startedHandler(fut)); return fut; }
public CompletableFuture<Void> stop() throws InterruptedException { CompletableFuture<Void> fut = new CompletableFuture<>(); stop(Helper.stoppedHandler(fut)); return fut; }
public CompletableFuture<Void> start(Consumer<TtyConnection> handler) throws Exception { CompletableFuture<Void> fut = new CompletableFuture<>(); start(handler, io.termd.core.util.Helper.startedHandler(fut)); return fut; }
public synchronized static void main(String[] args) throws Exception { NettySshTtyBootstrap bootstrap = new NettySshTtyBootstrap().setHost("localhost").setPort(4000); bootstrap.start(ReadlineFunctionExample::handle).get(10, TimeUnit.SECONDS); System.out.println("Telnet server started on localhost:4000"); SshReadlineFunctionExample.class.wait(); } }
public synchronized static void main(String[] args) throws Exception { NettySshTtyBootstrap bootstrap = new NettySshTtyBootstrap().setHost("localhost").setPort(4000); bootstrap.start(EventsExample::handle).get(10, TimeUnit.SECONDS); System.out.println("Telnet server started on localhost:4000"); SshEventsExample.class.wait(); } }
public synchronized static void main(String[] args) throws Exception { NettySshTtyBootstrap bootstrap = new NettySshTtyBootstrap().setHost("localhost").setPort(4000); bootstrap.start(ReadlineExample::handle).get(10, TimeUnit.SECONDS); System.out.println("Telnet server started on localhost:4000"); SshReadlineExample.class.wait(); } }
public synchronized static void main(String[] args) throws Exception { NettySshTtyBootstrap bootstrap = new NettySshTtyBootstrap().setHost("localhost").setPort(4000); bootstrap.start(ReadlineFunctionExample::handle).get(10, TimeUnit.SECONDS); System.out.println("Telnet server started on localhost:4000"); SshReadlineFunctionExample.class.wait(); } }
public synchronized static void main(String[] args) throws Exception { NettySshTtyBootstrap bootstrap = new NettySshTtyBootstrap().setHost("localhost").setPort(4000); bootstrap.start(ReadlineExample::handle).get(10, TimeUnit.SECONDS); System.out.println("Telnet server started on localhost:4000"); SshReadlineExample.class.wait(); } }
public synchronized static void main(String[] args) throws Exception { NettySshTtyBootstrap bootstrap = new NettySshTtyBootstrap(). setPort(5000). setHost("localhost"); bootstrap.start(new Plasma()).get(10, TimeUnit.SECONDS); System.out.println("SSH started on localhost:5000"); SshPlasmaExample.class.wait(); } }
public synchronized static void main(String[] args) throws Exception { NettySshTtyBootstrap bootstrap = new NettySshTtyBootstrap(). setPort(5000). setHost("localhost"); bootstrap.start(new Shell()).get(10, TimeUnit.SECONDS); System.out.println("SSH started on localhost:5000"); SshShellExample.class.wait(); } }
public synchronized static void main(String[] args) throws Exception { NettySshTtyBootstrap bootstrap = new NettySshTtyBootstrap(). setPort(5000). setHost("localhost"); bootstrap.start(new Shell()).get(10, TimeUnit.SECONDS); System.out.println("SSH started on localhost:5000"); SshShellExample.class.wait(); } }
public synchronized static void main(String[] args) throws Exception { NettySshTtyBootstrap bootstrap = new NettySshTtyBootstrap(). setPort(5000). setHost("localhost"); bootstrap.start(new SnakeGame()).get(10, TimeUnit.SECONDS); System.out.println("SSH started on localhost:5000"); SshSnakeExample.class.wait(); } }
public synchronized static void main(String[] args) throws Exception { NettySshTtyBootstrap bootstrap = new NettySshTtyBootstrap(). setPort(5000). setHost("localhost"); bootstrap.start(new Plasma()).get(10, TimeUnit.SECONDS); System.out.println("SSH started on localhost:5000"); SshPlasmaExample.class.wait(); } }
public synchronized static void main(String[] args) throws Exception { NettySshTtyBootstrap bootstrap = new NettySshTtyBootstrap(). setPort(5000). setHost("localhost"); bootstrap.start(new SnakeGame()).get(10, TimeUnit.SECONDS); System.out.println("SSH started on localhost:5000"); SshSnakeExample.class.wait(); } }
public synchronized static void main(String[] args) throws Exception { NettySshTtyBootstrap bootstrap = new NettySshTtyBootstrap(). setPort(5000). setHost("localhost"); bootstrap.start(conn -> new TtyBridge(conn).readline()).get(10, TimeUnit.SECONDS); System.out.println("SSH started on localhost:5000"); SshPtyBridgeExample.class.wait(); } }
public synchronized static void main(String[] args) throws Exception { NettySshTtyBootstrap bootstrap = new NettySshTtyBootstrap(). setPort(5000). setHost("localhost"); bootstrap.start(conn -> new TtyBridge(conn).readline()).get(10, TimeUnit.SECONDS); System.out.println("SSH started on localhost:5000"); SshPtyBridgeExample.class.wait(); } }
public synchronized static void main(String[] args) throws Exception { NettySshTtyBootstrap bootstrap = new NettySshTtyBootstrap(). setPort(5000). setHost("localhost"); Robot robot = new Robot(); bootstrap.start(conn -> new Screencaster(robot, conn).handle()).get(10, TimeUnit.SECONDS); System.out.println("SSH started on localhost:5000"); SshScreencastingExample.class.wait(); } }
public synchronized static void main(String[] args) throws Exception { NettySshTtyBootstrap bootstrap = new NettySshTtyBootstrap(). setPort(5000). setHost("localhost"); Robot robot = new Robot(); bootstrap.start(conn -> new Screencaster(robot, conn).handle()).get(10, TimeUnit.SECONDS); System.out.println("SSH started on localhost:5000"); SshScreencastingExample.class.wait(); } }