org.dawb.common.python
Class EDJob

java.lang.Object
  extended by org.dawb.common.python.EDJob
All Implemented Interfaces:
java.io.Serializable

public class EDJob
extends java.lang.Object
implements java.io.Serializable

Class encapsulating EDNA python plugins. Uses EDJob to run jobs asynchronously and avoid the blocking nature of the jepp system. Usage: final EDJob job = new EDJob(pluginName); job.setDataInput(... some xml); job.execute() // Blocks final String output = job.getDataOutput();

Author:
gerring
See Also:
Serialized Form

Constructor Summary
EDJob(java.lang.String pluginName, java.lang.String execDir)
          NOTE Assumes that PYTHONPATH and EDNA_HOME are already set properly.
 
Method Summary
 void execute()
          Runs the command in this thread.
 java.lang.String getDataOutput()
           
 boolean isFinished()
          returns true when EDJob has finished.
 void setDataInput(java.lang.String xmlString)
           
 void setDataOutput(java.lang.String out)
          Called by python not Java
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EDJob

public EDJob(java.lang.String pluginName,
             java.lang.String execDir)
NOTE Assumes that PYTHONPATH and EDNA_HOME are already set properly. In the workbench session we do this automatically for the user.

Parameters:
pluginName -
Method Detail

setDataInput

public void setDataInput(java.lang.String xmlString)

getDataOutput

public java.lang.String getDataOutput()

setDataOutput

public void setDataOutput(java.lang.String out)
Called by python not Java

Parameters:
key -

execute

public void execute()
             throws java.lang.Exception
Runs the command in this thread. It blocks until there is some dataOutput

Throws:
java.lang.Exception

isFinished

public boolean isFinished()
returns true when EDJob has finished.

Returns: