Class ExecUtil

java.lang.Object
io.quarkus.deployment.util.ExecUtil

@Deprecated(forRemoval=true) public class ExecUtil extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Use the smallrye-common-process API instead.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Kill the process, if still alive, kill it forcibly
    static boolean
    exec(File directory, String command, String... args)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Execute the specified command from within the specified directory.
    static boolean
    exec(File directory, Function<InputStream,Runnable> outputFilterFunction, String command, String... args)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Execute the specified command from within the specified directory.
    static boolean
    exec(String command, String... args)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Execute the specified command from within the current directory.
    static int
    execProcess(Process process, Function<InputStream,Runnable> outputFilterFunction)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static int
    execProcessWithTimeout(Process process, Function<InputStream,Runnable> outputFilterFunction, Duration timeout)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static boolean
    execWithDebugLogging(File directory, String command, String... args)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Execute the specified command from within the specified directory using debug logging.
    static boolean
    execWithDebugLogging(String command, String... args)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Execute the specified command from within the current directory using debug logging.
    static boolean
    execWithSystemLogging(File directory, String command, String... args)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Execute the specified command from within the specified directory using system logging.
    static boolean
    execWithSystemLogging(String command, String... args)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Execute the specified command from within the current directory using system logging.
    static boolean
    execWithTimeout(File directory, Duration timeout, String command, String... args)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Execute the specified command until the given timeout from within the specified directory.
    static boolean
    execWithTimeout(File directory, Function<InputStream,Runnable> outputFilterFunction, Duration timeout, String command, String... args)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Execute the specified command until the given timeout from within the specified directory.
    static boolean
    execWithTimeout(Duration timeout, String command, String... args)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Execute the specified command until the given timeout from within the current directory.
    static Process
    startProcess(File directory, String command, String... args)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Start a process executing given command with arguments within the specified directory.
    static Process
    startProcess(File directory, Map<String,String> environment, String command, String... args)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Start a process executing given command with arguments within the specified directory.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • INFO_LOGGING

      public static final Function<InputStream,Runnable> INFO_LOGGING
      Deprecated, for removal: This API element is subject to removal in a future version.
    • DEBUG_LOGGING

      public static final Function<InputStream,Runnable> DEBUG_LOGGING
      Deprecated, for removal: This API element is subject to removal in a future version.
    • SYSTEM_LOGGING

      public static final Function<InputStream,Runnable> SYSTEM_LOGGING
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Constructor Details

    • ExecUtil

      public ExecUtil()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • exec

      public static boolean exec(String command, String... args)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Execute the specified command from within the current directory.
      Parameters:
      command - The command
      args - The command arguments
      Returns:
      true if commands where executed successfully
    • execWithTimeout

      public static boolean execWithTimeout(Duration timeout, String command, String... args)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Execute the specified command until the given timeout from within the current directory.
      Parameters:
      timeout - The timeout
      command - The command
      args - The command arguments
      Returns:
      true if commands where executed successfully
    • exec

      public static boolean exec(File directory, String command, String... args)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Execute the specified command from within the specified directory.
      Parameters:
      directory - The directory
      command - The command
      args - The command arguments
      Returns:
      true if commands where executed successfully
    • execWithTimeout

      public static boolean execWithTimeout(File directory, Duration timeout, String command, String... args)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Execute the specified command until the given timeout from within the specified directory.
      Parameters:
      directory - The directory
      timeout - The timeout
      command - The command
      args - The command arguments
      Returns:
      true if commands where executed successfully
    • exec

      public static boolean exec(File directory, Function<InputStream,Runnable> outputFilterFunction, String command, String... args)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Execute the specified command from within the specified directory. The method allows specifying an output filter that processes the command output.
      Parameters:
      directory - The directory
      outputFilterFunction - A Function that gets an InputStream and returns an outputFilter.
      command - The command
      args - The command arguments
      Returns:
      true if commands where executed successfully
    • execProcess

      public static int execProcess(Process process, Function<InputStream,Runnable> outputFilterFunction)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • execProcessWithTimeout

      public static int execProcessWithTimeout(Process process, Function<InputStream,Runnable> outputFilterFunction, Duration timeout)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • execWithTimeout

      public static boolean execWithTimeout(File directory, Function<InputStream,Runnable> outputFilterFunction, Duration timeout, String command, String... args)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Execute the specified command until the given timeout from within the specified directory. The method allows specifying an output filter that processes the command output.
      Parameters:
      directory - The directory
      outputFilterFunction - A Function that gets an InputStream and returns an outputFilter.
      timeout - The timeout
      command - The command
      args - The command arguments
      Returns:
      true if commands where executed successfully
    • execWithDebugLogging

      public static boolean execWithDebugLogging(String command, String... args)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Execute the specified command from within the current directory using debug logging.
      Parameters:
      command - The command
      args - The command arguments
      Returns:
      true if commands where executed successfully
    • execWithDebugLogging

      public static boolean execWithDebugLogging(File directory, String command, String... args)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Execute the specified command from within the specified directory using debug logging.
      Parameters:
      directory - The directory
      command - The command
      args - The command arguments
      Returns:
      true if commands where executed successfully
    • execWithSystemLogging

      public static boolean execWithSystemLogging(String command, String... args)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Execute the specified command from within the current directory using system logging.
      Parameters:
      command - The command
      args - The command arguments
      Returns:
      true if commands where executed successfully
    • execWithSystemLogging

      public static boolean execWithSystemLogging(File directory, String command, String... args)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Execute the specified command from within the specified directory using system logging.
      Parameters:
      directory - The directory
      command - The command
      args - The command arguments
      Returns:
      true if commands where executed successfully
    • startProcess

      public static Process startProcess(File directory, Map<String,String> environment, String command, String... args)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Start a process executing given command with arguments within the specified directory.
      Parameters:
      directory - The directory
      environment - The command environment
      command - The command and args
      Returns:
      the process
    • startProcess

      public static Process startProcess(File directory, String command, String... args)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Start a process executing given command with arguments within the specified directory.
      Parameters:
      directory - The directory
      command - The command
      args - The command arguments
      Returns:
      the process
    • destroyProcess

      public static void destroyProcess(Process process)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Kill the process, if still alive, kill it forcibly
      Parameters:
      process - the process to kill