compbio.engine.local
Class ExecutableWrapper
java.lang.Object
compbio.engine.local.ExecutableWrapper
- All Implemented Interfaces:
- Callable<ConfiguredExecutable<?>>
@Immutable
public final class ExecutableWrapper
- extends Object
- implements Callable<ConfiguredExecutable<?>>
Method Summary |
ConfiguredExecutable<?> |
call()
It is vital that output and error streams are captured immediately for
this call() to succeed. |
static void |
shutdownService()
Stops internal executor service which captures streams of native
executables. |
PROC_OUT_FILE
public static final String PROC_OUT_FILE
- See Also:
- Constant Field Values
PROC_ERR_FILE
public static final String PROC_ERR_FILE
- See Also:
- Constant Field Values
ExecutableWrapper
public ExecutableWrapper(ConfiguredExecutable<?> executable,
String workDirectory)
throws JobSubmissionException
- Throws:
JobSubmissionException
shutdownService
public static final void shutdownService()
- Stops internal executor service which captures streams of native
executables. This method is intended for stopping service if deployed in
the web application content. There is NO NEED of using this method
otherwise as the executor service is taken care of internally.
call
public ConfiguredExecutable<?> call()
throws IOException
- It is vital that output and error streams are captured immediately for
this call() to succeed. Thus each instance if ExecutableWrapper has 2 its
own thread ready to capture the output. If executor could not execute
capture immediately this could lead to the call method to stale, as
execution could not proceed without output being captured. Every call to
call() method will use 2 threads
- Specified by:
call
in interface Callable<ConfiguredExecutable<?>>
- Throws:
IOException