public class ImageCommand extends ProcessStarter implements ErrorConsumer
BUFFER_SIZE| Constructor and Description |
|---|
ImageCommand()
Constructor.
|
ImageCommand(String... pCommands)
Constructor setting the commands.
|
| Modifier and Type | Method and Description |
|---|---|
void |
consumeError(InputStream pInputStream)
This method just saves the stderr-output into an internal field.
|
void |
createScript(PrintWriter pWriter,
Operation pOp,
Properties pProps)
Generate a script.
|
void |
createScript(String pFilename,
Operation pOp)
Generate a script.
|
void |
createScript(String pFilename,
Operation pOp,
Properties pProps)
Generate a script.
|
protected void |
finished(int pReturnCode)
Post-processing after the process has terminated.
|
LinkedList<String> |
getCommand()
Get the command.
|
ArrayList<String> |
getErrorText()
Get the error-text associated with this command (might be null).
|
ProcessTask |
getProcessTask(Operation pOperation,
Object... images)
Return a ProcessTask for future execution (replace given placeholders).
|
void |
run(Operation pOperation,
Object... images)
Execute the command (replace given placeholders).
|
void |
setCommand(String... pCommands)
Set the command.
|
static void |
setDefaultScriptGenerator(ScriptGenerator pGen)
Set the default ScriptGenerator.
|
void |
setScriptGenerator(ScriptGenerator pGen)
Set the ScriptGenerator.
|
addProcessEventListener, addProcessListener, finished, getGlobalSearchPath, getPID, getProcessTask, getSearchPath, isAsyncMode, removeProcessEventListener, run, searchForCmd, setAsyncMode, setErrorConsumer, setGlobalSearchPath, setInputProvider, setOutputConsumer, setPID, setPIDCounter, setSearchPathpublic ImageCommand()
public ImageCommand(String... pCommands)
public void setCommand(String... pCommands)
public LinkedList<String> getCommand()
public ArrayList<String> getErrorText()
public void run(Operation pOperation, Object... images) throws IOException, InterruptedException, IM4JavaException
pOperation - The Operation to executeimages - Zero or more images (replace placeholders in pOperation)IOException, - InterruptedException, IM4JavaExceptionIOExceptionInterruptedExceptionIM4JavaExceptionpublic ProcessTask getProcessTask(Operation pOperation, Object... images) throws IOException, IM4JavaException
pOperation - The Operation to executeimages - Zero or more images (replace placeholders in pOperation)IOException, - IM4JavaExceptionIOExceptionIM4JavaExceptionprotected void finished(int pReturnCode)
throws Exception
finished in class ProcessStarterpReturnCode - the return-code of the processExceptionpublic void consumeError(InputStream pInputStream) throws IOException
consumeError in interface ErrorConsumerIOExceptionErrorConsumer.consumeError(java.io.InputStream)public static void setDefaultScriptGenerator(ScriptGenerator pGen)
public void setScriptGenerator(ScriptGenerator pGen)
public void createScript(PrintWriter pWriter, Operation pOp, Properties pProps)
public void createScript(String pFilename, Operation pOp, Properties pProps) throws FileNotFoundException
FileNotFoundExceptionpublic void createScript(String pFilename, Operation pOp) throws FileNotFoundException
FileNotFoundExceptionCopyright © 2019. All rights reserved.