Class CommandRunOptions.Builder

    • Method Detail

      • workingDir

        public CommandRunOptions.Builder workingDir​(java.nio.file.Path workingDir)
        Sets the working directory for the command.
        Parameters:
        workingDir - the working directory
        Returns:
        the builder
      • additionalEnv

        public CommandRunOptions.Builder additionalEnv​(java.util.Map<java.lang.String,​java.lang.String> additionalEnv)
        Sets the additional environment variables for the command.
        Parameters:
        additionalEnv - the additional environment variables
        Returns:
        the builder
      • standardInput

        public CommandRunOptions.Builder standardInput​(java.lang.String standardInput)
        Sets the standard input for the command.
        Parameters:
        standardInput - the standard input
        Returns:
        the builder
      • onStandardOutput

        public CommandRunOptions.Builder onStandardOutput​(java.util.function.Consumer<java.lang.String> onStandardOutput)
        Sets a consumer that will be called with each line of standard output from the command.
        Parameters:
        onStandardOutput - the consumer for standard output
        Returns:
        the builder
      • onStandardError

        public CommandRunOptions.Builder onStandardError​(java.util.function.Consumer<java.lang.String> onStandardError)
        Sets a consumer that will be called with each line of standard error from the command.
        Parameters:
        onStandardError - the consumer for standard error
        Returns:
        the builder
      • onEngineEvent

        public CommandRunOptions.Builder onEngineEvent​(java.util.function.Consumer<EngineEvent> onEngineEvent)
        Sets a consumer that will be called with each engine event from the command.
        Parameters:
        onEngineEvent - the consumer for engine events
        Returns:
        the builder