Package org.eclipse.jgit.transport
Interface RemoteSession
-
- All Known Subinterfaces:
RemoteSession2
- All Known Implementing Classes:
JschSession,SshdSession,TransportGitSsh.ExtSession
public interface RemoteSessionAn abstraction of a remote "session" for executing remote commands.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voiddisconnect()Disconnects the remote session.java.lang.Processexec(java.lang.String commandName, int timeout)Creates a new remoteProcessto execute the given command.default FtpChannelgetFtpChannel()Obtains anFtpChannelfor performing FTP operations over thisRemoteSession.
-
-
-
Method Detail
-
exec
java.lang.Process exec(java.lang.String commandName, int timeout) throws java.io.IOExceptionCreates a new remoteProcessto execute the given command. The returned process's streams exist and are connected, and execution of the process is already started.- Parameters:
commandName- command to executetimeout- timeout value, in seconds, for creating the remote process- Returns:
- a new remote process, already started
- Throws:
java.io.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 java.io.IOException).
-
getFtpChannel
default FtpChannel getFtpChannel()
Obtains anFtpChannelfor performing FTP operations over thisRemoteSession. The default implementation returnsnull.- Returns:
- the
FtpChannel - Since:
- 5.2
-
disconnect
void disconnect()
Disconnects the remote session.
-
-