PTP
Release 5.0

org.eclipse.ptp.remote.core
Class AbstractRemoteProcessBuilder

java.lang.Object
  extended by org.eclipse.ptp.remote.core.AbstractRemoteProcessBuilder
All Implemented Interfaces:
IRemoteProcessBuilder

public abstract class AbstractRemoteProcessBuilder
extends java.lang.Object
implements IRemoteProcessBuilder

Since:
5.0

Field Summary
 
Fields inherited from interface org.eclipse.ptp.remote.core.IRemoteProcessBuilder
ALLOCATE_PTY, FORWARD_X11, NONE
 
Constructor Summary
AbstractRemoteProcessBuilder(IRemoteConnection conn, java.util.List<java.lang.String> command)
           
AbstractRemoteProcessBuilder(IRemoteConnection conn, java.lang.String... command)
           
 
Method Summary
 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.
 IRemoteConnection connection()
          Returns this process builder's connection.
 IRemoteProcessBuilder connection(IRemoteConnection conn)
          Sets this process builder's connection.
 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.
abstract  int getSupportedFlags()
          Get the flags that are supported by this process builder.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractRemoteProcessBuilder

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

AbstractRemoteProcessBuilder

public AbstractRemoteProcessBuilder(IRemoteConnection conn,
                                    java.lang.String... command)
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

connection

public IRemoteConnection connection()
Description copied from interface: IRemoteProcessBuilder
Returns this process builder's connection.

Specified by:
connection in interface IRemoteProcessBuilder
Returns:
the connection used by this process builder

connection

public IRemoteProcessBuilder connection(IRemoteConnection conn)
Description copied from interface: IRemoteProcessBuilder
Sets this process builder's connection.

Specified by:
connection 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
Throws:
java.io.IOException
Since:
5.0

PTP
Release 5.0

Copyright (c) 2011 IBM Corporation and others. All Rights Reserved.