Package org.eclipse.remote.core
Class AbstractRemoteProcessBuilder
java.lang.Object
org.eclipse.remote.core.AbstractRemoteProcessBuilder
- All Implemented Interfaces:
IRemoteProcessBuilder
Abstract base class for remote process builders. Implementors can use this class to provide a default implementation of a remote
process builder.
- Since:
- 5.0
-
Field Summary
Fields inherited from interface org.eclipse.remote.core.IRemoteProcessBuilder
ALLOCATE_PTY, APPEND_ENVIRONMENT, FORWARD_X11, NONE
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractRemoteProcessBuilder
(IRemoteConnection connection, String... command) AbstractRemoteProcessBuilder
(IRemoteConnection connection, List<String> command) -
Method Summary
Modifier and TypeMethodDescriptioncommand()
Returns this process builder's operating system program and arguments.Sets this process builder's operating system program and arguments.Sets this process builder's operating system program and arguments.org.eclipse.core.filesystem.IFileStore
Returns this process builder's working directory.directory
(org.eclipse.core.filesystem.IFileStore directory) Sets this process builder's working directory.Returns a string map view of this process builder's environment.Get the connection that will be used by this process builder to create remote processes.abstract int
Get the flags that are supported by this process builder.protected IRemoteProcess
boolean
Tells whether this process builder merges standard error and standard output.redirectErrorStream
(boolean redirectErrorStream) Sets this process builder's redirectErrorStream property.start()
Starts a new process using the attributes of this process builder.abstract IRemoteProcess
start
(int flags) Starts a new process using the attributes of this process builder.toString()
-
Constructor Details
-
AbstractRemoteProcessBuilder
- Since:
- 2.0
-
AbstractRemoteProcessBuilder
- Since:
- 2.0
-
-
Method Details
-
command
Description copied from interface:IRemoteProcessBuilder
Returns this process builder's operating system program and arguments.- Specified by:
command
in interfaceIRemoteProcessBuilder
- Returns:
- a list containing the program and arguments
-
command
Description copied from interface:IRemoteProcessBuilder
Sets this process builder's operating system program and arguments.- Specified by:
command
in interfaceIRemoteProcessBuilder
- Parameters:
command
-- Returns:
- This process builder
-
command
Description copied from interface:IRemoteProcessBuilder
Sets this process builder's operating system program and arguments.- Specified by:
command
in interfaceIRemoteProcessBuilder
- Parameters:
command
-- Returns:
- this process builder
-
directory
public org.eclipse.core.filesystem.IFileStore directory()Description copied from interface:IRemoteProcessBuilder
Returns this process builder's working directory.- Specified by:
directory
in interfaceIRemoteProcessBuilder
- Returns:
- an IFileStore reference to the working directory
-
directory
Description copied from interface:IRemoteProcessBuilder
Sets this process builder's working directory.- Specified by:
directory
in interfaceIRemoteProcessBuilder
- Parameters:
directory
-- Returns:
- This process builder
-
environment
Description copied from interface:IRemoteProcessBuilder
Returns a string map view of this process builder's environment. The returned map behaves in the same manner as described inProcessBuilder.environment()
.- Specified by:
environment
in interfaceIRemoteProcessBuilder
- Returns:
- the process builder's environment
-
getSupportedFlags
public abstract int getSupportedFlags()Description copied from interface:IRemoteProcessBuilder
Get the flags that are supported by this process builder.- Specified by:
getSupportedFlags
in interfaceIRemoteProcessBuilder
- Returns:
- bitwise-or of the supported flags
- Since:
- 5.0
-
redirectErrorStream
public boolean redirectErrorStream()Description copied from interface:IRemoteProcessBuilder
Tells whether this process builder merges standard error and standard output.- Specified by:
redirectErrorStream
in interfaceIRemoteProcessBuilder
- Returns:
- true if standard error and standard output will be merged
-
redirectErrorStream
Description copied from interface:IRemoteProcessBuilder
Sets this process builder's redirectErrorStream property.- Specified by:
redirectErrorStream
in interfaceIRemoteProcessBuilder
- Parameters:
redirectErrorStream
-- Returns:
- This process builder
-
start
Description copied from interface:IRemoteProcessBuilder
Starts a new process using the attributes of this process builder.- Specified by:
start
in interfaceIRemoteProcessBuilder
- Returns:
- remote process object
- Throws:
IOException
-
start
Description copied from interface:IRemoteProcessBuilder
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 useIRemoteProcessBuilder.getSupportedFlags()
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)
- Specified by:
start
in interfaceIRemoteProcessBuilder
- Parameters:
flags
- bitwise-or of flags to use when starting process- Returns:
- remote process object
- Throws:
IOException
- Since:
- 5.0
-
toString
-
getRemoteConnection
Description copied from interface:IRemoteProcessBuilder
Get the connection that will be used by this process builder to create remote processes.- Specified by:
getRemoteConnection
in interfaceIRemoteProcessBuilder
- Returns:
- connection used to create remote processes
- Since:
- 2.0
-
newRemoteProcess
- Since:
- 4.0
-