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

Method initialize

extensions/http-curl/protocols/RESTSender.cpp:44–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void RESTSender::initialize(core::controller::ControllerServiceProvider* controller, const std::shared_ptr<Configure> &configure) {
45 C2Protocol::initialize(controller, configure);
46 // base URL when one is not specified.
47 if (nullptr != configure) {
48 std::string update_str, ssl_context_service_str;
49 configure->get("nifi.c2.rest.url", "c2.rest.url", rest_uri_);
50 configure->get("nifi.c2.rest.url.ack", "c2.rest.url.ack", ack_uri_);
51 if (configure->get("nifi.c2.rest.ssl.context.service", "c2.rest.ssl.context.service", ssl_context_service_str)) {
52 auto service = controller->getControllerService(ssl_context_service_str);
53 if (nullptr != service) {
54 ssl_context_service_ = std::static_pointer_cast<minifi::controllers::SSLContextService>(service);
55 }
56 }
57 configure->get("nifi.c2.rest.heartbeat.minimize.updates", "c2.rest.heartbeat.minimize.updates", update_str);
58 utils::StringUtils::StringToBool(update_str, minimize_updates_);
59 }
60 logger_->log_debug("Submitting to %s", rest_uri_);
61}
62
63C2Payload RESTSender::consumePayload(const std::string &url, const C2Payload &payload, Direction direction, bool /*async*/) {
64 std::string outputConfig;

Callers 1

setSecurityContextMethod · 0.45

Calls 3

log_debugMethod · 0.80
getMethod · 0.45
getControllerServiceMethod · 0.45

Tested by

no test coverage detected