java.lang.Object
org.eclipse.jgit.transport.ssh.jsch.JschSession
- All Implemented Interfaces:
org.eclipse.jgit.transport.RemoteSession,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 Summary
ConstructorsConstructorDescriptionJschSession(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. -
Method Summary
Modifier and TypeMethodDescriptionvoidorg.eclipse.jgit.transport.FtpChannelcom.jcraft.jsch.ChannelDeprecated.
-
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
- Specified by:
execin interfaceorg.eclipse.jgit.transport.RemoteSession- Throws:
IOException
-
exec
- Specified by:
execin interfaceorg.eclipse.jgit.transport.RemoteSession2- Throws:
IOException
-
disconnect
public void disconnect()- Specified by:
disconnectin interfaceorg.eclipse.jgit.transport.RemoteSession
-
getSftpChannel
Deprecated.since 5.2; usegetFtpChannel()insteadA kludge to allowTransportSftpto get an Sftp channel from Jsch. Ideally, this method would be generic, which would require implementing generic Sftp channel operations in the RemoteSession class.- Returns:
- a channel suitable for Sftp operations.
- Throws:
com.jcraft.jsch.JSchException- on problems getting the channel.
-
getFtpChannel
public org.eclipse.jgit.transport.FtpChannel getFtpChannel()- Specified by:
getFtpChannelin interfaceorg.eclipse.jgit.transport.RemoteSession- Since:
- 5.2
-
getFtpChannel()instead