/** * @return the current height, i.e the number of columns or if unknown */ public int height() { int ret = delegate.height(); return ret; }
/** * Set a resize handler, the handler is called when the tty size changes. * @param handler the resize handler * @return this object */ public io.vertx.rxjava.ext.shell.term.Tty resizehandler(Handler<Void> handler) { delegate.resizehandler(handler); return this; }
/** * Set a stream handler on the standard input to read the data. * @param handler the standard input * @return this object */ public io.vertx.rxjava.ext.shell.term.Tty stdinHandler(Handler<String> handler) { delegate.stdinHandler(handler); return this; }
processForeground = false; if (stdinHandler != null) { tty.stdinHandler(null); tty.resizehandler(null); processForeground = true; if (stdinHandler != null) { tty.stdinHandler(stdinHandler); tty.resizehandler(resizeHandler);
/** * Write data to the standard output. * @param data the data to write * @return this object */ public io.vertx.rxjava.ext.shell.term.Tty write(String data) { delegate.write(data); return this; }
/** * @return the declared tty type, for instance , , etc... it can be null when the tty does not have declared its type. */ public String type() { String ret = delegate.type(); return ret; }
/** * @return the current width, i.e the number of rows or if unknown */ public int width() { int ret = delegate.width(); return ret; }
/** * Write data to the standard output. * @param data the data to write * @return this object */ public io.vertx.rxjava.ext.shell.term.Tty write(String data) { delegate.write(data); return this; }
/** * @return the declared tty type, for instance , , etc... it can be null when the tty does not have declared its type. */ public String type() { String ret = delegate.type(); return ret; }
/** * @return the current width, i.e the number of rows or if unknown */ public int width() { int ret = delegate.width(); return ret; }
@Override public CommandProcess write(String data) { synchronized (ProcessImpl.this) { if (processStatus != ExecStatus.RUNNING) { throw new IllegalStateException("Cannot write to standard output when " + status().name().toLowerCase()); } } processContext.runOnContext(v -> { tty.write(data); }); return this; }
@Override public String type() { return tty.type(); }
/** * @return the current height, i.e the number of columns or if unknown */ public int height() { int ret = delegate.height(); return ret; }
/** * Set a stream handler on the standard input to read the data. * @param handler the standard input * @return this object */ public io.vertx.rxjava.ext.shell.term.Tty stdinHandler(Handler<String> handler) { delegate.stdinHandler(handler); return this; }
@Override public int width() { return tty.width(); }
/** * Set a resize handler, the handler is called when the tty size changes. * @param handler the resize handler * @return this object */ public io.vertx.rxjava.ext.shell.term.Tty resizehandler(Handler<Void> handler) { delegate.resizehandler(handler); return this; }
@Override public int height() { return tty.height(); }
@Override public CommandProcess stdinHandler(Handler<String> handler) { if (handler != null) { stdinHandler = data -> context.runOnContext(v -> handler.handle(data)); } else { stdinHandler = null; } if (processForeground && stdinHandler != null) { tty.stdinHandler(stdinHandler); } return this; }
@Override public CommandProcess resizehandler(Handler<Void> handler) { if (handler != null) { resizeHandler = v -> context.runOnContext(handler::handle); } else { resizeHandler = null; } tty.resizehandler(resizeHandler); return this; }