public abstract class ProcessLauncher extends Object implements org.apache.commons.exec.ExecuteResultHandler
| Modifier and Type | Class and Description |
|---|---|
static class |
ProcessLauncher.ProcessLogOutputStream |
static class |
ProcessLauncher.State |
| Modifier and Type | Field and Description |
|---|---|
protected String |
errorMessage |
protected ProcessLauncher.State |
state |
| Constructor and Description |
|---|
ProcessLauncher(org.apache.commons.exec.CommandLine commandLine,
Map<String,String> envs,
ProcessLauncher.ProcessLogOutputStream processLogOutput,
String workingDirectory) |
ProcessLauncher(org.apache.commons.exec.CommandLine commandLine,
Map<String,String> envs,
String workingDirectory) |
| Modifier and Type | Method and Description |
|---|---|
String |
getErrorMessage() |
String |
getProcessLaunchOutput() |
boolean |
isLaunchTimeout() |
boolean |
isRunning() |
void |
launch() |
void |
onProcessComplete(int exitValue) |
void |
onProcessFailed(org.apache.commons.exec.ExecuteException e) |
void |
onProcessRunning() |
void |
onTimeout() |
void |
setRedirectedContext(org.apache.zeppelin.interpreter.InterpreterContext redirectedContext)
In some cases we need to redirect process output to paragraph's InterpreterOutput.
|
void |
stop() |
void |
stopCatchLaunchOutput() |
void |
transition(ProcessLauncher.State state) |
abstract void |
waitForReady(int timeout) |
protected String errorMessage
protected ProcessLauncher.State state
public ProcessLauncher(org.apache.commons.exec.CommandLine commandLine,
Map<String,String> envs,
String workingDirectory)
public ProcessLauncher(org.apache.commons.exec.CommandLine commandLine,
Map<String,String> envs,
ProcessLauncher.ProcessLogOutputStream processLogOutput,
String workingDirectory)
public void setRedirectedContext(org.apache.zeppelin.interpreter.InterpreterContext redirectedContext)
redirectedContext - redirect process outputpublic void launch()
public abstract void waitForReady(int timeout)
public void transition(ProcessLauncher.State state)
public void onTimeout()
public void onProcessRunning()
public void onProcessComplete(int exitValue)
onProcessComplete in interface org.apache.commons.exec.ExecuteResultHandlerpublic void onProcessFailed(org.apache.commons.exec.ExecuteException e)
onProcessFailed in interface org.apache.commons.exec.ExecuteResultHandlerpublic String getErrorMessage()
public String getProcessLaunchOutput()
public boolean isLaunchTimeout()
public boolean isRunning()
public void stop()
public void stopCatchLaunchOutput()
Copyright © 2016–2020. All rights reserved.