Package org.eclipse.jgit.transport
Interface RemoteSession2
-
- All Superinterfaces:
RemoteSession
- All Known Implementing Classes:
JschSession
,SshdSession
public interface RemoteSession2 extends RemoteSession
ARemoteSession
that supports passing environment variables to commands.- Since:
- 5.11
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Process
exec(String commandName, Map<String,String> environment, int timeout)
Creates a new remoteProcess
to execute the given command.-
Methods inherited from interface org.eclipse.jgit.transport.RemoteSession
disconnect, exec, getFtpChannel
-
-
-
-
Method Detail
-
exec
Process exec(String commandName, Map<String,String> environment, int timeout) throws IOException
Creates a new remoteProcess
to 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 executeenvironment
- environment variables to pass ontimeout
- timeout value, in seconds, for creating the remote process- Returns:
- a new remote process, already started
- Throws:
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).
-
-