Interface Shell


  • public interface Shell
    The shell interface provides access to shell specific information and methods.
    • Method Detail

      • setReturnCode

        void setReturnCode​(int returnCode)
        Set the return code for the shell. The return code will be returned to the calling context once the script finishes. This can be called multiple times, the last set value will be used.
        Parameters:
        returnCode - the return code.
      • getTimeZone

        String getTimeZone()
        Get the name of the time zone that this shell is in.
        Returns:
        the name of the time zone.
      • getUserName

        String getUserName()
        Get the name of the user running this shell.
        Returns:
        the name of the user.
      • getIsolationGroup

        String getIsolationGroup()
        Get the name of the isolation group that this shell is in.
        Returns:
        the name of the isolation group.
      • getInputStream

        InputStream getInputStream​(String pathname)
                            throws IOException
        Get an input stream of any file that the remote shell process can read.
        Parameters:
        pathname - Full or relative pathname.
        Returns:
        Input stream for this file.
        Throws:
        IOException
      • getEnvironmentVariable

        String getEnvironmentVariable​(String name)
        Get an environment variable from the process on the host that the remote shell was called from. Returns null if this is not in remote shell context or the parameter does not exist.
        Parameters:
        name - Name of the environment parameter
        Returns:
        Value of the environment parameter