|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.ncl.cs.instantsoap.python.PythonExecutor
public class PythonExecutor
Java code to execute Python scripts.
The Executor is responsible for handling the native Python processes, invoking them with the correct options, and marshaling and unmarshaling the XML for them.
Constructor Summary | |
---|---|
PythonExecutor()
|
Method Summary | |
---|---|
Map<String,String> |
execute(String module,
String application,
Map<String,String> inputs)
Execute a particular entry point in a module. |
String |
getExecutePy()
Get the python execution script name. |
File[] |
getExtraPythonPaths()
Get all of the extra python paths that should be searched when scanning for modules. |
File |
getInstantPyLocation()
Get the python driver directory. |
String |
getIntrospectPy()
Get the name of the python introspection script. |
String |
getPythonShell()
Get the python shell. |
File |
getWorkingDir()
Get the working directory for native commands launched through this executor. |
Map<String,ScriptMetaData> |
introspectScript(String module)
Introspect all of the instantsoap entry points in the named module. |
void |
setExecutePy(String executePy)
Set the python execution script name. |
void |
setExtraPythonPaths(File[] extraPythonPaths)
Set all of the extra python paths that should be searched when scanning for modules. |
void |
setInstantPyLocation(File instantPyLocation)
Set the python driver directory. |
void |
setIntrospectPy(String introspectPy)
Set the name of the python introspection script. |
void |
setPythonShell(String pythonShell)
Set the python shell. |
void |
setWorkingDir(File workingDir)
Set the working directory for native commands launched through this executor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PythonExecutor()
Method Detail |
---|
public String getPythonShell()
public void setPythonShell(String pythonShell)
pythonShell
- the python shell locationpublic File getWorkingDir()
File
public void setWorkingDir(File workingDir)
workingDir
- the new working directory File
public File getInstantPyLocation()
File
giving the location of the python driver scriptspublic void setInstantPyLocation(File instantPyLocation)
instantPyLocation
- the File
where the python driver is installedpublic File[] getExtraPythonPaths()
File
spublic void setExtraPythonPaths(File[] extraPythonPaths)
extraPythonPaths
- the python paths as an array of File
spublic String getIntrospectPy()
public void setIntrospectPy(String introspectPy)
introspectPy
- the python introspection script namepublic String getExecutePy()
public void setExecutePy(String executePy)
executePy
- the execution script namepublic Map<String,ScriptMetaData> introspectScript(String module) throws JAXBException, IOException
module
- the module to scan
JAXBException
- if the XML messages could not be handled
IOException
- if there where problems contacting the native processpublic Map<String,String> execute(String module, String application, Map<String,String> inputs) throws IOException, JAXBException, TransformerException
module
- the module to useapplication
- the named entrypoint in the moduleinputs
- the name/value inputs
IOException
- if there where problems communicating with the native process
JAXBException
- if there where problems with the XML
TransformerException
- if there where problems formatting the XML messages
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |