MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / onTrigger

Method onTrigger

extensions/pcap/CapturePacket.cpp:216–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214CapturePacket::~CapturePacket() = default;
215
216void CapturePacket::onTrigger(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSession> &session) {
217 CapturePacketMechanism *capture;
218 if (mover->sink.try_dequeue(capture)) {
219 auto ff = session->create();
220 session->import(capture->getFile(), ff, false, 0);
221 logger_->log_debug("Received packet capture in file %s %d for %s", capture->getFile(), capture->getSize(), ff->getResourceClaim()->getContentFullPath());
222 session->transfer(ff, Success);
223 delete capture;
224 } else {
225 context->yield();
226 }
227}
228
229}
230/* namespace processors */

Callers

nothing calls this directly

Calls 9

importMethod · 0.80
getFileMethod · 0.80
log_debugMethod · 0.80
getResourceClaimMethod · 0.80
createMethod · 0.45
getSizeMethod · 0.45
getContentFullPathMethod · 0.45
transferMethod · 0.45
yieldMethod · 0.45

Tested by

no test coverage detected