Tabnine Logo
TtyCommand
Code IndexAdd Tabnine to your IDE (free)

How to use
TtyCommand
in
io.termd.core.ssh

Best Java code snippets using io.termd.core.ssh.TtyCommand (Showing top 18 results out of 315)

origin: io.termd/termd-core

 @Override
 public void close(int exit) {
  try {
   TtyCommand.this.close(exit);
  } catch (IOException ignore) {
  }
 }
}
origin: io.termd/termd-core

@Override
public void execute(Runnable task) {
 TtyCommand.this.execute(task);
}
origin: io.termd/termd-core

@Override
public void schedule(Runnable task, long delay, TimeUnit unit) {
 TtyCommand.this.schedule(task, delay, unit);
}
origin: com.alibaba.middleware/termd-core

protected TtyCommand createConnection(Consumer<TtyConnection> onConnect) {
 return new TtyCommand(charset, onConnect);
}
origin: io.termd/termd-core

@Override
public void start(final Environment env) throws IOException {
 String lcctype = env.getEnv().get("LC_CTYPE");
 if (lcctype != null) {
  charset = parseCharset(lcctype);
 }
 if (charset == null) {
  charset = defaultCharset;
 }
 env.addSignalListener(signal -> updateSize(env), EnumSet.of(org.apache.sshd.server.Signal.WINCH));
 updateSize(env);
 // Event handling
 int vintr = getControlChar(env, PtyMode.VINTR, 3);
 int vsusp = getControlChar(env, PtyMode.VSUSP, 26);
 int veof = getControlChar(env, PtyMode.VEOF, 4);
 //
 eventDecoder = new TtyEventDecoder(vintr, vsusp, veof);
 decoder = new BinaryDecoder(512, charset, eventDecoder);
 stdout = new TtyOutputMode(new BinaryEncoder(charset, out));
 term = env.getEnv().get("TERM");
 conn = new Connection();
 //
 session.setDataReceiver(this);
 handler.accept(conn);
}
origin: io.termd/termd-core

protected TtyCommand createConnection(Consumer<TtyConnection> onConnect) {
 return new TtyCommand(charset, onConnect);
}
origin: termd/termd

@Override
public void start(final Environment env) throws IOException {
 String lcctype = env.getEnv().get("LC_CTYPE");
 if (lcctype != null) {
  charset = parseCharset(lcctype);
 }
 if (charset == null) {
  charset = defaultCharset;
 }
 env.addSignalListener(signal -> updateSize(env), EnumSet.of(org.apache.sshd.server.Signal.WINCH));
 updateSize(env);
 // Event handling
 int vintr = getControlChar(env, PtyMode.VINTR, 3);
 int vsusp = getControlChar(env, PtyMode.VSUSP, 26);
 int veof = getControlChar(env, PtyMode.VEOF, 4);
 //
 eventDecoder = new TtyEventDecoder(vintr, vsusp, veof);
 decoder = new BinaryDecoder(512, charset, eventDecoder);
 stdout = new TtyOutputMode(new BinaryEncoder(charset, out));
 term = env.getEnv().get("TERM");
 conn = new Connection();
 //
 session.setDataReceiver(this);
 handler.accept(conn);
}
origin: termd/termd

protected TtyCommand createConnection(Consumer<TtyConnection> onConnect) {
 return new TtyCommand(charset, onConnect);
}
origin: termd/termd

@Override
public void close() {
 try {
  TtyCommand.this.close();
 } catch (IOException ignore) {
 }
}
origin: termd/termd

@Override
public void schedule(Runnable task, long delay, TimeUnit unit) {
 TtyCommand.this.schedule(task, delay, unit);
}
origin: termd/termd

@Override
public void execute(Runnable task) {
 TtyCommand.this.execute(task);
}
origin: io.termd/termd-core

public void start(Consumer<TtyConnection> factory, Consumer<Throwable> doneHandler) {
 server = SshServer.setUpDefaultServer();
 server.setIoServiceFactoryFactory(new NettyIoServiceFactoryFactory(childGroup));
 server.setPort(port);
 server.setHost(host);
 server.setKeyPairProvider(keyPairProvider);
 server.setPasswordAuthenticator(passwordAuthenticator);
 server.setShellFactory(() -> new TtyCommand(charset, factory));
 try {
  server.start();
 } catch (Exception e) {
  doneHandler.accept(e);
  return;
 }
 doneHandler.accept(null);
}
origin: termd/termd

 @Override
 public void close(int exit) {
  try {
   TtyCommand.this.close(exit);
  } catch (IOException ignore) {
  }
 }
}
origin: termd/termd

public void start(Consumer<TtyConnection> factory, Consumer<Throwable> doneHandler) {
 server = SshServer.setUpDefaultServer();
 server.setIoServiceFactoryFactory(new NettyIoServiceFactoryFactory(childGroup));
 server.setPort(port);
 server.setHost(host);
 server.setKeyPairProvider(keyPairProvider);
 server.setPasswordAuthenticator(passwordAuthenticator);
 server.setShellFactory(() -> new TtyCommand(charset, factory));
 try {
  server.start();
 } catch (Exception e) {
  doneHandler.accept(e);
  return;
 }
 doneHandler.accept(null);
}
origin: io.termd/termd-core

@Override
public void close() {
 try {
  TtyCommand.this.close();
 } catch (IOException ignore) {
 }
}
origin: io.vertx/vertx-shell

nativeServer.setShellFactory(() -> new TtyCommand(defaultCharset, connectionHandler::handle));
Handler<SSHExec> execHandler = this.execHandler;
if (execHandler != null) {
 nativeServer.setCommandFactory(command -> new TtyCommand(defaultCharset, conn -> {
  execHandler.handle(new SSHExec(command, conn));
 }));
origin: termd/termd

@Override
public void close() throws IOException {
 close(0);
}
origin: io.termd/termd-core

@Override
public void close() throws IOException {
 close(0);
}
io.termd.core.sshTtyCommand

Most used methods

  • <init>
  • close
  • execute
  • getControlChar
  • parseCharset
  • schedule
  • updateSize

Popular in Java

  • Finding current android device location
  • getSystemService (Context)
  • getSupportFragmentManager (FragmentActivity)
  • scheduleAtFixedRate (Timer)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • JOptionPane (javax.swing)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now