java.lang.Object
org.eclipse.jgit.transport.ssh.jsch.JschSession
All Implemented Interfaces:
org.eclipse.jgit.transport.RemoteSession, org.eclipse.jgit.transport.RemoteSession2

public class JschSession extends Object implements org.eclipse.jgit.transport.RemoteSession2
Run remote commands using Jsch.

This class is the default session implementation using Jsch. Note that JschConfigSessionFactory is used to create the actual session passed to the constructor.

Since:
6.0
  • Constructor Details

    • JschSession

      public JschSession(com.jcraft.jsch.Session session, org.eclipse.jgit.transport.URIish uri)
      Create a new session object by passing the real Jsch session and the URI information.
      Parameters:
      session - the real Jsch session created elsewhere.
      uri - the URI information for the remote connection
  • Method Details

    • exec

      public Process exec(String command, int timeout) throws IOException
      Specified by:
      exec in interface org.eclipse.jgit.transport.RemoteSession
      Throws:
      IOException
    • exec

      public Process exec(String command, Map<String,String> environment, int timeout) throws IOException
      Specified by:
      exec in interface org.eclipse.jgit.transport.RemoteSession2
      Throws:
      IOException
    • disconnect

      public void disconnect()
      Specified by:
      disconnect in interface org.eclipse.jgit.transport.RemoteSession
    • getFtpChannel

      public org.eclipse.jgit.transport.FtpChannel getFtpChannel()
      Specified by:
      getFtpChannel in interface org.eclipse.jgit.transport.RemoteSession
      Since:
      5.2