Package io.jans.service
Class PythonService
java.lang.Object
io.jans.service.PythonService
- All Implemented Interfaces:
Serializable
Provides operations with python module
- Author:
- Yuriy Movchan Date: 08.21.2012
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddestroy()When application undeploy we need clean up pythonInterpretervoidinit()booleaninitPythonInterpreter(String pythonModulesDir) <T> TloadPythonScript(InputStream scriptFile, String scriptName, String scriptPythonType, Class<T> scriptJavaType, org.python.core.PyObject[] constructorArgs) <T> TloadPythonScript(String scriptName, String scriptPythonType, Class<T> scriptJavaType, org.python.core.PyObject[] constructorArgs)
-
Constructor Details
-
PythonService
public PythonService()
-
-
Method Details
-
init
@PostConstruct public void init() -
configure
public void configure() -
initPythonInterpreter
-
destroy
@PreDestroy public void destroy()When application undeploy we need clean up pythonInterpreter -
loadPythonScript
public <T> T loadPythonScript(String scriptName, String scriptPythonType, Class<T> scriptJavaType, org.python.core.PyObject[] constructorArgs) throws PythonException - Throws:
PythonException
-
loadPythonScript
public <T> T loadPythonScript(InputStream scriptFile, String scriptName, String scriptPythonType, Class<T> scriptJavaType, org.python.core.PyObject[] constructorArgs) throws PythonException - Throws:
PythonException
-