@Override public void signal(Signal sig) throws TransportException { sendChannelRequest("signal", false, new Buffer.PlainBuffer().putString(sig.toString())); }
@Override public Shell startShell() throws ConnectionException, TransportException { checkReuse(); sendChannelRequest("shell", true, null).await(conn.getTimeoutMs(), TimeUnit.MILLISECONDS); usedUp = true; return this; }
@Override public Subsystem startSubsystem(String name) throws ConnectionException, TransportException { checkReuse(); log.info("Will request `{}` subsystem", name); sendChannelRequest("subsystem", true, new Buffer.PlainBuffer().putString(name)) .await(conn.getTimeoutMs(), TimeUnit.MILLISECONDS); usedUp = true; return this; }
@Override public Command exec(String command) throws ConnectionException, TransportException { checkReuse(); log.debug("Will request to exec `{}`", command); sendChannelRequest("exec", true, new Buffer.PlainBuffer().putString(command, getRemoteCharset())) .await(conn.getTimeoutMs(), TimeUnit.MILLISECONDS); usedUp = true; return this; }
@Override public void setEnvVar(String name, String value) throws ConnectionException, TransportException { sendChannelRequest("env", true, new Buffer.PlainBuffer().putString(name).putString(value)) .await(conn.getTimeoutMs(), TimeUnit.MILLISECONDS); }
@Override public void changeWindowDimensions(int cols, int rows, int width, int height) throws TransportException { sendChannelRequest( "window-change", false, new Buffer.PlainBuffer() .putUInt32(cols) .putUInt32(rows) .putUInt32(width) .putUInt32(height) ); }
@Override public void reqX11Forwarding(String authProto, String authCookie, int screen) throws ConnectionException, TransportException { sendChannelRequest( "x11-req", true, new Buffer.PlainBuffer() .putBoolean(false) .putString(authProto) .putString(authCookie) .putUInt32(screen) ).await(conn.getTimeoutMs(), TimeUnit.MILLISECONDS); }
@Override public void allocatePTY(String term, int cols, int rows, int width, int height, Map<PTYMode, Integer> modes) throws ConnectionException, TransportException { sendChannelRequest( "pty-req", true, new Buffer.PlainBuffer() .putString(term) .putUInt32(cols) .putUInt32(rows) .putUInt32(width) .putUInt32(height) .putBytes(PTYMode.encode(modes)) ).await(conn.getTimeoutMs(), TimeUnit.MILLISECONDS); }
@Override public Shell startShell() throws ConnectionException, TransportException { checkReuse(); sendChannelRequest("shell", true, null).await(conn.getTimeoutMs(), TimeUnit.MILLISECONDS); usedUp = true; return this; }
@Override public void signal(Signal sig) throws TransportException { sendChannelRequest("signal", false, new Buffer.PlainBuffer().putString(sig.toString())); }
@Override public Shell startShell() throws ConnectionException, TransportException { checkReuse(); sendChannelRequest("shell", true, null).await(conn.getTimeoutMs(), TimeUnit.MILLISECONDS); usedUp = true; return this; }
@Override public void signal(Signal sig) throws TransportException { sendChannelRequest("signal", false, new Buffer.PlainBuffer().putString(sig.toString())); }
@Override public Command exec(String command) throws ConnectionException, TransportException { checkReuse(); log.info("Will request to exec `{}`", command); sendChannelRequest("exec", true, new Buffer.PlainBuffer().putString(command)) .await(conn.getTimeoutMs(), TimeUnit.MILLISECONDS); usedUp = true; return this; }
@Override public Subsystem startSubsystem(String name) throws ConnectionException, TransportException { checkReuse(); log.info("Will request `{}` subsystem", name); sendChannelRequest("subsystem", true, new Buffer.PlainBuffer().putString(name)) .await(conn.getTimeoutMs(), TimeUnit.MILLISECONDS); usedUp = true; return this; }
@Override public Subsystem startSubsystem(String name) throws ConnectionException, TransportException { checkReuse(); log.info("Will request `{}` subsystem", name); sendChannelRequest("subsystem", true, new Buffer.PlainBuffer().putString(name)) .await(conn.getTimeoutMs(), TimeUnit.MILLISECONDS); usedUp = true; return this; }
@Override public Command exec(String command) throws ConnectionException, TransportException { checkReuse(); log.debug("Will request to exec `{}`", command); sendChannelRequest("exec", true, new Buffer.PlainBuffer().putString(command, getRemoteCharset())) .await(conn.getTimeoutMs(), TimeUnit.MILLISECONDS); usedUp = true; return this; }
@Override public void setEnvVar(String name, String value) throws ConnectionException, TransportException { sendChannelRequest("env", true, new Buffer.PlainBuffer().putString(name).putString(value)) .await(conn.getTimeoutMs(), TimeUnit.MILLISECONDS); }
@Override public void setEnvVar(String name, String value) throws ConnectionException, TransportException { sendChannelRequest("env", true, new Buffer.PlainBuffer().putString(name).putString(value)) .await(conn.getTimeoutMs(), TimeUnit.MILLISECONDS); }
@Override public void reqX11Forwarding(String authProto, String authCookie, int screen) throws ConnectionException, TransportException { sendChannelRequest( "x11-req", true, new Buffer.PlainBuffer() .putBoolean(false) .putString(authProto) .putString(authCookie) .putUInt32(screen) ).await(conn.getTimeoutMs(), TimeUnit.MILLISECONDS); }
@Override public void reqX11Forwarding(String authProto, String authCookie, int screen) throws ConnectionException, TransportException { sendChannelRequest( "x11-req", true, new Buffer.PlainBuffer() .putBoolean(false) .putString(authProto) .putString(authCookie) .putUInt32(screen) ).await(conn.getTimeoutMs(), TimeUnit.MILLISECONDS); }