java.lang.Object
org.eclipse.jgit.transport.sshd.SshdSession
All Implemented Interfaces:
org.eclipse.jgit.transport.RemoteSession, org.eclipse.jgit.transport.RemoteSession2

public class SshdSession extends Object implements org.eclipse.jgit.transport.RemoteSession2
An implementation of RemoteSession based on Apache MINA sshd.
Since:
5.2
  • Method Details

    • addCloseListener

      public void addCloseListener(@NonNull SessionCloseListener listener)
      Adds a SessionCloseListener to this session. Has no effect if the given listener is already registered with this session.
      Parameters:
      listener - to add
    • removeCloseListener

      public void removeCloseListener(@NonNull SessionCloseListener listener)
      Removes the given listener; has no effect if the listener is not currently registered with this session.
      Parameters:
      listener - to remove
    • exec

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

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

      @NonNull public org.eclipse.jgit.transport.FtpChannel getFtpChannel()
      Obtain an FtpChannel to perform SFTP operations in this SshdSession.
      Specified by:
      getFtpChannel in interface org.eclipse.jgit.transport.RemoteSession
    • disconnect

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