|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jgit.transport.JschSession
public class JschSession
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.
Constructor Summary | |
---|---|
JschSession(com.jcraft.jsch.Session session,
URIish uri)
Create a new session object by passing the real Jsch session and the URI information. |
Method Summary | |
---|---|
void |
disconnect()
Disconnect the remote session |
Process |
exec(String command,
int timeout)
Generate a new remote process to execute the given command. |
com.jcraft.jsch.Channel |
getSftpChannel()
A kludge to allow TransportSftp to get an Sftp channel from Jsch. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JschSession(com.jcraft.jsch.Session session, URIish uri)
session
- the real Jsch session created elsewhere.uri
- the URI information for the remote connectionMethod Detail |
---|
public Process exec(String command, int timeout) throws IOException
RemoteSession
exec
in interface RemoteSession
command
- command to executetimeout
- timeout value, in seconds, for command execution
IOException
- may be thrown in several cases. For example, on problems
opening input or output streams or on problems connecting or
communicating with the remote host. For the latter two cases,
a TransportException may be thrown (a subclass of
IOException).public void disconnect()
RemoteSession
disconnect
in interface RemoteSession
public com.jcraft.jsch.Channel getSftpChannel() throws com.jcraft.jsch.JSchException
TransportSftp
to get an Sftp channel from Jsch.
Ideally, this method would be generic, which would require implementing
generic Sftp channel operations in the RemoteSession class.
com.jcraft.jsch.JSchException
- on problems getting the channel.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |