compbio.engine.local
Class ExecutableWrapper

java.lang.Object
  extended by 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<?>>


Field Summary
static java.lang.String PROC_ERR_FILE
           
static java.lang.String PROC_OUT_FILE
           
 
Constructor Summary
ExecutableWrapper(ConfiguredExecutable<?> executable, java.lang.String workDirectory)
           
 
Method Summary
 ConfiguredExecutable<?> call()
          It is vital that output and error streams are captured immediately for this call() to succeed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

ExecutableWrapper

public ExecutableWrapper(ConfiguredExecutable<?> executable,
                         java.lang.String workDirectory)
                  throws JobSubmissionException
Throws:
JobSubmissionException
Method Detail

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