public static class PythonParser.PythonDispatcherCallback extends InformationExtractionHandlerDispatcher.DispatcherCallback implements Runnable
Constructor and Description |
---|
PythonDispatcherCallback(LibrarySession session,
InformationExtractionHandlerDispatcher handler,
String dispCallbackKey)
Constructs a PythonDispatcherCallback.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes a PythonDispatcherCallback.
|
void |
dispose(boolean failed)
Disposes a PythonDispatcherCallback.
|
void |
launchPython(List<String> commandList)
Launch the Python subprocess.
|
void |
requestParse(String inputAbsFilePath)
Request a parse.
|
void |
run()
Runs the stream reader thread.
|
protected void |
startStartStreamReaderThread()
Start a Thread that runs this instance.
|
void |
writeCommand(String command)
Send a commnd to the Python subprocess.
|
public PythonDispatcherCallback(LibrarySession session, InformationExtractionHandlerDispatcher handler, String dispCallbackKey) throws IfsException
session
- Session contexthandler
- handler context (if any)dispCallbackKey
- dispatcher callback keyIfsException
- if the operation failspublic void launchPython(List<String> commandList) throws IfsException
commandList
- the Python command to runIfsException
- if the operation failspublic void requestParse(String inputAbsFilePath)
inputAbsFilePath
- the input filesyncMode
- true if parse is performed synchronouslypublic void writeCommand(String command) throws IfsException
command
- the command to sendIfsException
- if the operation failspublic void dispose()
dispose
in class InformationExtractionHandlerDispatcher.DispatcherCallback
public void dispose(boolean failed)
failed
- protected void startStartStreamReaderThread()
Invoked in the static accessor in subclasses as the singleton instance is created.
Copyright © 2023. All rights reserved.