compbio.engine.local
Class ExecutableWrapper
java.lang.Object
compbio.engine.local.ExecutableWrapper
- All Implemented Interfaces:
- java.util.concurrent.Callable<ConfiguredExecutable<?>>
@Immutable
public final class ExecutableWrapper
- extends java.lang.Object
- implements java.util.concurrent.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. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROC_OUT_FILE
public static final java.lang.String PROC_OUT_FILE
- See Also:
- Constant Field Values
PROC_ERR_FILE
public static final java.lang.String PROC_ERR_FILE
- See Also:
- Constant Field Values
ExecutableWrapper
public ExecutableWrapper(ConfiguredExecutable<?> executable,
java.lang.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 java.io.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 java.util.concurrent.Callable<ConfiguredExecutable<?>>
- Throws:
java.io.IOException