Package org.eclipse.remote.core
Interface IRemoteProcessBuilder
-
- All Known Implementing Classes:
AbstractRemoteProcessBuilder
public interface IRemoteProcessBuilderAbstraction of a process builder for remote processes. This interface behaves in the same manner asProcessBuilder.
-
-
Field Summary
Fields Modifier and Type Field Description static intALLOCATE_PTYFlag to request allocation of a pseudo-terminal for the process (RFC-4254 Sec.static intAPPEND_ENVIRONMENTFlag to request that the supplied environment be apended to the remote environment; otherwise it is replaced.static intFORWARD_X11Flag to request X11 forwarding (RFC-4254 Sec.static intNONE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<String>command()Returns this process builder's operating system program and arguments.IRemoteProcessBuildercommand(String... command)Sets this process builder's operating system program and arguments.IRemoteProcessBuildercommand(List<String> command)Sets this process builder's operating system program and arguments.org.eclipse.core.filesystem.IFileStoredirectory()Returns this process builder's working directory.IRemoteProcessBuilderdirectory(org.eclipse.core.filesystem.IFileStore directory)Sets this process builder's working directory.Map<String,String>environment()Returns a string map view of this process builder's environment.IRemoteConnectiongetRemoteConnection()Get the connection that will be used by this process builder to create remote processes.intgetSupportedFlags()Get the flags that are supported by this process builder.booleanredirectErrorStream()Tells whether this process builder merges standard error and standard output.IRemoteProcessBuilderredirectErrorStream(boolean redirectErrorStream)Sets this process builder's redirectErrorStream property.IRemoteProcessstart()Starts a new process using the attributes of this process builder.IRemoteProcessstart(int flags)Starts a new process using the attributes of this process builder.
-
-
-
Field Detail
-
NONE
static final int NONE
- Since:
- 5.0
- See Also:
- Constant Field Values
-
ALLOCATE_PTY
static final int ALLOCATE_PTY
Flag to request allocation of a pseudo-terminal for the process (RFC-4254 Sec. 6.2)- Since:
- 5.0
- See Also:
- Constant Field Values
-
FORWARD_X11
static final int FORWARD_X11
Flag to request X11 forwarding (RFC-4254 Sec. 6.3)- Since:
- 5.0
- See Also:
- Constant Field Values
-
APPEND_ENVIRONMENT
static final int APPEND_ENVIRONMENT
Flag to request that the supplied environment be apended to the remote environment; otherwise it is replaced.- Since:
- 3.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
command
List<String> command()
Returns this process builder's operating system program and arguments.- Returns:
- a list containing the program and arguments
-
command
IRemoteProcessBuilder command(List<String> command)
Sets this process builder's operating system program and arguments.- Parameters:
command-- Returns:
- This process builder
-
command
IRemoteProcessBuilder command(String... command)
Sets this process builder's operating system program and arguments.- Parameters:
command-- Returns:
- this process builder
-
directory
org.eclipse.core.filesystem.IFileStore directory()
Returns this process builder's working directory.- Returns:
- an IFileStore reference to the working directory
-
directory
IRemoteProcessBuilder directory(org.eclipse.core.filesystem.IFileStore directory)
Sets this process builder's working directory.- Parameters:
directory-- Returns:
- This process builder
-
environment
Map<String,String> environment()
Returns a string map view of this process builder's environment. The returned map behaves in the same manner as described inProcessBuilder.environment().- Returns:
- the process builder's environment
-
getSupportedFlags
int getSupportedFlags()
Get the flags that are supported by this process builder.- Returns:
- bitwise-or of the supported flags
- Since:
- 5.0
-
redirectErrorStream
boolean redirectErrorStream()
Tells whether this process builder merges standard error and standard output.- Returns:
- true if standard error and standard output will be merged
-
redirectErrorStream
IRemoteProcessBuilder redirectErrorStream(boolean redirectErrorStream)
Sets this process builder's redirectErrorStream property.- Parameters:
redirectErrorStream-- Returns:
- This process builder
-
start
IRemoteProcess start() throws IOException
Starts a new process using the attributes of this process builder.- Returns:
- remote process object
- Throws:
IOException
-
start
IRemoteProcess start(int flags) throws IOException
Starts a new process using the attributes of this process builder. The flags may be used to modify behavior of the remote process. These flags may only be supported by specific types of remote service providers. Clients can usegetSupportedFlags()to find out the flags supported by the service provider.Current flags are: NONE - disable any flags ALLOCATE_PTY - allocate a pseudo-terminal for the process (RFC-4254 Sec. 6.2) FORWARD_X11 - enable X11 forwarding (RFC-4254 Sec. 6.3)
- Parameters:
flags- bitwise-or of flags to use when starting process- Returns:
- remote process object
- Throws:
IOException- Since:
- 5.0
-
getRemoteConnection
IRemoteConnection getRemoteConnection()
Get the connection that will be used by this process builder to create remote processes.- Returns:
- connection used to create remote processes
- Since:
- 2.0
-
-