/** * Create a term server for the SSH protocol. * * @param vertx the vertx instance * @return the term server */ static TermServer createSSHTermServer(Vertx vertx) { return createSSHTermServer(vertx, new SSHTermOptions()); }
/** * Create a term server for the SSH protocol. * @param vertx the vertx instance * @param options the ssh options * @return the term server */ public static io.vertx.rxjava.ext.shell.term.TermServer createSSHTermServer(io.vertx.rxjava.core.Vertx vertx, SSHTermOptions options) { io.vertx.rxjava.ext.shell.term.TermServer ret = io.vertx.rxjava.ext.shell.term.TermServer.newInstance(io.vertx.ext.shell.term.TermServer.createSSHTermServer(vertx.getDelegate(), options)); return ret; }
/** * Create a term server for the SSH protocol. * @param vertx the vertx instance * @return the term server */ public static io.vertx.rxjava.ext.shell.term.TermServer createSSHTermServer(io.vertx.rxjava.core.Vertx vertx) { io.vertx.rxjava.ext.shell.term.TermServer ret = io.vertx.rxjava.ext.shell.term.TermServer.newInstance(io.vertx.ext.shell.term.TermServer.createSSHTermServer(vertx.getDelegate())); return ret; }
/** * Create a term server for the SSH protocol. * @param vertx the vertx instance * @return the term server */ public static io.vertx.rxjava.ext.shell.term.TermServer createSSHTermServer(io.vertx.rxjava.core.Vertx vertx) { io.vertx.rxjava.ext.shell.term.TermServer ret = io.vertx.rxjava.ext.shell.term.TermServer.newInstance(io.vertx.ext.shell.term.TermServer.createSSHTermServer(vertx.getDelegate())); return ret; }
/** * Create a term server for the SSH protocol. * @param vertx the vertx instance * @param options the ssh options * @return the term server */ public static io.vertx.rxjava.ext.shell.term.TermServer createSSHTermServer(io.vertx.rxjava.core.Vertx vertx, SSHTermOptions options) { io.vertx.rxjava.ext.shell.term.TermServer ret = io.vertx.rxjava.ext.shell.term.TermServer.newInstance(io.vertx.ext.shell.term.TermServer.createSSHTermServer(vertx.getDelegate(), options)); return ret; }
public static io.vertx.ext.shell.term.TermServer createSSHTermServer(io.vertx.ext.shell.term.TermServer j_receiver, io.vertx.core.Vertx vertx, java.util.Map<String, Object> options) { return io.vertx.core.impl.ConversionHelper.fromObject(io.vertx.ext.shell.term.TermServer.createSSHTermServer(vertx, options != null ? new io.vertx.ext.shell.term.SSHTermOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null)); } public static io.vertx.ext.shell.term.TermServer createTelnetTermServer(io.vertx.ext.shell.term.TermServer j_receiver, io.vertx.core.Vertx vertx, java.util.Map<String, Object> options) {
protected void startShell(SSHTermOptions options) throws ExecutionException, InterruptedException, TimeoutException { if (server != null) { throw new IllegalStateException(); } server = TermServer.createSSHTermServer(vertx, options); CompletableFuture<Void> fut = new CompletableFuture<>(); server.termHandler(termHandler); ((SSHServer)server).setExecHandler(execHandler); server.authProvider(authProvider); server.listen(ar -> { if (ar.succeeded()) { fut.complete(null); } else { fut.completeExceptionally(ar.cause()); } }); fut.get(10, TimeUnit.SECONDS); }