org.eclipse.remote.core

## Class AbstractRemoteProcessBuilder

- java.lang.Object
- - org.eclipse.remote.core.AbstractRemoteProcessBuilder

All Implemented Interfaces:
  IRemoteProcessBuilder

    public abstract class AbstractRemoteProcessBuilder
    extends java.lang.Object
    implements 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

Constructors
Constructor and Description
`AbstractRemoteProcessBuilder(IRemoteConnection connection, java.util.List<java.lang.String> command)`
`AbstractRemoteProcessBuilder(IRemoteConnection connection, java.lang.String... command)`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`java.util.List<java.lang.String>` `command()` Returns this process builder's operating system program and arguments.
`IRemoteProcessBuilder` `command(java.util.List<java.lang.String> command)` Sets this process builder's operating system program and arguments.
`IRemoteProcessBuilder` `command(java.lang.String... command)` Sets this process builder's operating system program and arguments.
`org.eclipse.core.filesystem.IFileStore` `directory()` Returns this process builder's working directory.
`IRemoteProcessBuilder` `directory(org.eclipse.core.filesystem.IFileStore directory)` Sets this process builder's working directory.
`abstract java.util.Map<java.lang.String,java.lang.String>` `environment()` Returns a string map view of this process builder's environment.
`IRemoteConnection` `getRemoteConnection()` Get the connection that will be used by this process builder to create remote processes.
`abstract int` `getSupportedFlags()` Get the flags that are supported by this process builder.
`protected IRemoteProcess` `newRemoteProcess()`
`boolean` `redirectErrorStream()` Tells whether this process builder merges standard error and standard output.
`IRemoteProcessBuilder` `redirectErrorStream(boolean redirectErrorStream)` Sets this process builder's redirectErrorStream property.
`IRemoteProcess` `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.
`java.lang.String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### AbstractRemoteProcessBuilder

    public AbstractRemoteProcessBuilder(IRemoteConnection connection,
                                        java.util.List<java.lang.String> command)

Since:
  2.0

#### AbstractRemoteProcessBuilder

    public AbstractRemoteProcessBuilder(IRemoteConnection connection,
                                        java.lang.String... command)

Since:
  2.0

### Method Detail

#### command

    public java.util.List<java.lang.String> command()

Description copied from interface: `IRemoteProcessBuilder`
Returns this process builder's operating system program and arguments.

Specified by:
  `command` in interface `IRemoteProcessBuilder`
Returns:
  a list containing the program and arguments

#### command

    public IRemoteProcessBuilder command(java.util.List<java.lang.String> command)

Description copied from interface: `IRemoteProcessBuilder`
Sets this process builder's operating system program and arguments.

Specified by:
  `command` in interface `IRemoteProcessBuilder`
Returns:
  This process builder

#### command

    public IRemoteProcessBuilder command(java.lang.String... command)

Description copied from interface: `IRemoteProcessBuilder`
Sets this process builder's operating system program and arguments.

Specified by:
  `command` in interface `IRemoteProcessBuilder`
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 interface `IRemoteProcessBuilder`
Returns:
  an IFileStore reference to the working directory

#### directory

    public IRemoteProcessBuilder directory(org.eclipse.core.filesystem.IFileStore directory)

Description copied from interface: `IRemoteProcessBuilder`
Sets this process builder's working directory.

Specified by:
  `directory` in interface `IRemoteProcessBuilder`
Returns:
  This process builder

#### environment

    public abstract java.util.Map<java.lang.String,java.lang.String> 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 in `ProcessBuilder.environment()`.

Specified by:
  `environment` in interface `IRemoteProcessBuilder`
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 interface `IRemoteProcessBuilder`
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 interface `IRemoteProcessBuilder`
Returns:
  true if standard error and standard output will be merged

#### redirectErrorStream

    public IRemoteProcessBuilder redirectErrorStream(boolean redirectErrorStream)

Description copied from interface: `IRemoteProcessBuilder`
Sets this process builder's redirectErrorStream property.

Specified by:
  `redirectErrorStream` in interface `IRemoteProcessBuilder`
Returns:
  This process builder

#### start

    public IRemoteProcess start()
                         throws java.io.IOException

Description copied from interface: `IRemoteProcessBuilder`
Starts a new process using the attributes of this process builder.

Specified by:
  `start` in interface `IRemoteProcessBuilder`
Returns:
  remote process object
Throws:
  `java.io.IOException`

#### start

    public abstract IRemoteProcess start(int flags)
                                  throws java.io.IOException

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 use `IRemoteProcessBuilder.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 interface `IRemoteProcessBuilder`
Parameters:
  `flags` - bitwise-or of flags to use when starting process
Returns:
  remote process object
Throws:
  `java.io.IOException`
Since:
  5.0

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### getRemoteConnection

    public IRemoteConnection 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 interface `IRemoteProcessBuilder`
Returns:
  connection used to create remote processes
Since:
  2.0

#### newRemoteProcess

    protected IRemoteProcess newRemoteProcess()

Since:
  4.0