Uses of Class
org.zeroturnaround.exec.ProcessExecutor
Packages that use ProcessExecutor
-
Uses of ProcessExecutor in org.zeroturnaround.exec
Methods in org.zeroturnaround.exec that return ProcessExecutorModifier and TypeMethodDescriptionProcessExecutor.addDestroyer
(ProcessDestroyer destroyer) Adds a process destroyer to be notified when the process starts and stops.ProcessExecutor.addListener
(ProcessListener listener) Register new process event handler.ProcessExecutor.clearListeners()
Unregister all existing process event handlers.ProcessExecutor.closeTimeout
(long timeout, TimeUnit unit) Sets a timeout for closing standard streams of the process being executed.Sets the program and its arguments which are being executed.Sets the program and its arguments which are being executed.Sets the program and its arguments which are being executed.ProcessExecutor.commandSplit
(String commandWithArgs) Splits string by spaces and passes it tocommand(String...)
NB: this method do not handle whitespace escaping,"mkdir new\ folder"
would be interpreted as{"mkdir", "new\", "folder"}
command.ProcessExecutor.debug()
Deprecated.Deprecated.ProcessExecutor.debug
(org.slf4j.Logger log) Deprecated.ProcessExecutor.destroyer
(ProcessDestroyer destroyer) Sets the process destroyer to be notified when the process starts and stops.ProcessExecutor.destroyOnExit()
Sets the started process to be destroyed on VM exit (shutdown hooks are executed).Sets this working directory for the process being executed.ProcessExecutor.environment
(String name, String value) Adds a single additional environment variable for the process being executed.ProcessExecutor.environment
(Map<String, String> env) Adds additional environment variables for the process being executed.Sets the allowed exit value for the process being executed.ProcessExecutor.exitValueAny()
Allows any exit value for the process being executed.ProcessExecutor.exitValueNormal()
Allows only0
as the exit value for the process being executed.ProcessExecutor.exitValues
(int[] exitValues) Sets the allowed exit values for the process being executed.ProcessExecutor.exitValues
(Integer... exitValues) Sets the allowed exit values for the process being executed.ProcessExecutor.info()
Deprecated.Deprecated.ProcessExecutor.info
(org.slf4j.Logger log) Deprecated.ProcessExecutor.listener
(ProcessListener listener) Unregister all existing process event handlers and register new one.ProcessExecutor.readOutput
(boolean readOutput) Sets this process executor'sreadOutput
property.ProcessExecutor.redirectError
(OutputStream output) Redirects the process' error stream to given output stream.ProcessExecutor.redirectErrorAlsoTo
(OutputStream output) Redirects the process' error stream also to a given output stream.ProcessExecutor.redirectErrorAsDebug()
Deprecated.ProcessExecutor.redirectErrorAsDebug
(String name) Deprecated.ProcessExecutor.redirectErrorAsDebug
(org.slf4j.Logger log) Deprecated.ProcessExecutor.redirectErrorAsInfo()
Deprecated.ProcessExecutor.redirectErrorAsInfo
(String name) Deprecated.ProcessExecutor.redirectErrorAsInfo
(org.slf4j.Logger log) Deprecated.ProcessExecutor.redirectErrorStream
(boolean redirectErrorStream) Sets this process executor'sredirectErrorStream
property.ProcessExecutor.redirectInput
(InputStream input) Sets the input stream to redirect to the process' input stream.ProcessExecutor.redirectOutput
(OutputStream output) Redirects the process' output stream to given output stream.ProcessExecutor.redirectOutputAlsoTo
(OutputStream output) Redirects the process' output stream also to a given output stream.ProcessExecutor.redirectOutputAsDebug()
Deprecated.ProcessExecutor.redirectOutputAsDebug
(String name) Deprecated.ProcessExecutor.redirectOutputAsDebug
(org.slf4j.Logger log) Deprecated.ProcessExecutor.redirectOutputAsInfo()
Deprecated.ProcessExecutor.redirectOutputAsInfo
(String name) Deprecated.ProcessExecutor.redirectOutputAsInfo
(org.slf4j.Logger log) Deprecated.ProcessExecutor.removeListener
(ProcessListener listener) Unregister existing process event handler.ProcessExecutor.removeListeners
(Class<? extends ProcessListener> listenerType) Unregister existing process event handlers of given type or its sub-types.ProcessExecutor.setMessageLogger
(MessageLogger messageLogger) Changes how most common messages about starting and waiting for processes are actually logged.ProcessExecutor.stopper
(ProcessStopper stopper) Sets the helper for stopping the process in case of timeout or cancellation.ProcessExecutor.streams
(ExecuteStreamHandler streams) Sets a stream handler for the process being executed.Sets a timeout for the process being executed. -
Uses of ProcessExecutor in org.zeroturnaround.exec.listener
Methods in org.zeroturnaround.exec.listener with parameters of type ProcessExecutorModifier and TypeMethodDescriptionvoid
CompositeProcessListener.afterStart
(Process process, ProcessExecutor executor) void
DestroyerListenerAdapter.afterStart
(Process process, ProcessExecutor executor) void
ProcessListener.afterStart
(Process process, ProcessExecutor executor) Invoked after a process has started.void
CompositeProcessListener.beforeStart
(ProcessExecutor executor) void
ProcessListener.beforeStart
(ProcessExecutor executor) Invoked before a process is started.
redirectOutput(OutputStream)
andSlf4jStream