Interface IRemoteProcessService

All Superinterfaces:
IRemoteConnection.Service

public interface IRemoteProcessService extends IRemoteConnection.Service
A connection service for starting up processes on a remote.
Since:
2.0
  • Method Details

    • getEnv

      Map<String,String> getEnv()
      Returns an unmodifiable string map view of the remote environment. The connection must be open prior to calling this method.
      Returns:
      the remote environment
    • getEnv

      String getEnv(String name)
      Returns the value of an environment variable. The connection must be open prior to calling this method.
      Parameters:
      name - name of the environment variable
      Returns:
      value of the environment variable or null if the variable is not defined
    • getProcessBuilder

      IRemoteProcessBuilder getProcessBuilder(List<String> command)
      Get a process builder for creating remote processes
      Returns:
      process builder or null if connection is not open
    • getProcessBuilder

      IRemoteProcessBuilder getProcessBuilder(String... command)
      Get a process builder for creating remote processes
      Returns:
      process builder or null if connection is not open
    • getWorkingDirectory

      String getWorkingDirectory()
      Get the working directory. Relative paths will be resolved using this path. The remote connection does not need to be open to use this method, however a default directory path, rather than the actual working directory, may be returned in this case.
      Returns:
      String representing the current working directory
    • setWorkingDirectory

      void setWorkingDirectory(String path)
      Set the working directory while the connection is open. The working directory will revert to the default when the connection is closed then subsequently reopened. Relative paths will be resolved using this path. The path must be valid and absolute for any changes to be made.
      Parameters:
      path - String representing the current working directory
      Since:
      4.0