Package io.gem.api

Class SshUtils

java.lang.Object
io.gem.api.SshUtils

public final class SshUtils extends Object
Class SshUtils.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    copyDirectory(org.apache.sshd.client.session.ClientSession session, String srcPath, String dstPath)
    It copies directory of sessions.
    static org.apache.sshd.client.session.ClientSession
    createSession(org.apache.sshd.client.SshClient client, ConnectionConfig connConfig, long timeoutSeconds)
    This method is responsible for creating client sessions.
    static void
    runCommand(@NotNull org.apache.sshd.client.session.ClientSession session, String cmd, long timeoutSeconds, @NotNull SshResponse response)
    This method is responsible for running commands.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SshUtils

      public SshUtils()
  • Method Details

    • createSession

      public static org.apache.sshd.client.session.ClientSession createSession(org.apache.sshd.client.SshClient client, ConnectionConfig connConfig, long timeoutSeconds) throws IOException
      This method is responsible for creating client sessions.
      Parameters:
      client - SshClient
      connConfig - SshConnection
      timeoutSeconds - long
      Returns:
      session
      Throws:
      IOException - If it occurs
    • runCommand

      public static void runCommand(@NotNull @NotNull org.apache.sshd.client.session.ClientSession session, String cmd, long timeoutSeconds, @NotNull @NotNull SshResponse response) throws IOException
      This method is responsible for running commands.
      Parameters:
      session - final NotNull ClientSession
      cmd - String
      timeoutSeconds - long
      response - NotNull SshResponseStream
      Throws:
      IOException - If it occurs
    • copyDirectory

      public static void copyDirectory(org.apache.sshd.client.session.ClientSession session, String srcPath, String dstPath) throws IOException
      It copies directory of sessions.
      Parameters:
      session - final ClientSession
      srcPath - String
      dstPath - String
      Throws:
      IOException - If it occurs.