| 62 | } |
| 63 | |
| 64 | void LuaProcessSession::read(const std::shared_ptr<script::ScriptFlowFile> &script_flow_file, |
| 65 | sol::table input_stream_callback) { |
| 66 | if (!session_) { |
| 67 | throw std::runtime_error("Access of ProcessSession after it has been released"); |
| 68 | } |
| 69 | |
| 70 | auto flow_file = script_flow_file->getFlowFile(); |
| 71 | |
| 72 | if (!flow_file) { |
| 73 | throw std::runtime_error("Access of FlowFile after it has been released"); |
| 74 | } |
| 75 | |
| 76 | LuaInputStreamCallback lua_callback(input_stream_callback); |
| 77 | session_->read(flow_file, &lua_callback); |
| 78 | } |
| 79 | |
| 80 | void LuaProcessSession::write(const std::shared_ptr<script::ScriptFlowFile> &script_flow_file, |
| 81 | sol::table output_stream_callback) { |
nothing calls this directly
no test coverage detected