adam-markovics commented on a change in pull request #1253: URL: https://github.com/apache/nifi-minifi-cpp/pull/1253#discussion_r815904880
########## File path: libminifi/include/core/state/nodes/SupportedOperations.h ########## @@ -0,0 +1,69 @@ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include <string> +#include <vector> +#include <memory> +#include <unordered_map> + +#include "MetricsBase.h" +#include "c2/C2Payload.h" +#include "controllers/UpdatePolicyControllerService.h" + +namespace org::apache::nifi::minifi::state::response { + +class SupportedOperations : public DeviceInformation { + public: + SupportedOperations(const std::string &name, const utils::Identifier &uuid); + explicit SupportedOperations(const std::string &name); + + std::string getName() const override; + std::vector<SerializedResponseNode> serialize() override; + void setStateMonitor(const std::shared_ptr<state::StateMonitor> &monitor) { Review comment: I think it's more expressive on the interface to use copy and move when you store a shared_ptr. ########## File path: C2.md ########## @@ -148,22 +148,22 @@ configuration produces the following JSON: } } } - + ### Protocols -The default protocol is a RESTFul service; however, there is an MQTT protocol with a translation to use the Review comment: I don't think the MQTT protocol is working currently for C2. ########## File path: C2.md ########## @@ -67,30 +67,30 @@ be requested via C2 DESCRIBE manifest command. # ConfigurationChecksums: hashes of the configuration files; can be used to detect unexpected modifications # the default is nifi.c2.root.classes=DeviceInfoNode,AgentInformation,FlowInformation - + # specify C2 protocol -- default is RESTSender if not specified nifi.c2.agent.protocol.class=RESTSender # may also use MQTT or CoapProtocol # nifi.c2.agent.protocol.class=MQTTC2Protocol # nifi.c2.agent.protocol.class=CoapProtocol - + # control c2 heartbeat interval in millisecocnds Review comment: Could you please correct this typo with "millisecocnds"? ########## File path: libminifi/include/core/state/nodes/SupportedOperations.h ########## @@ -0,0 +1,69 @@ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include <string> +#include <vector> +#include <memory> +#include <unordered_map> + +#include "MetricsBase.h" +#include "c2/C2Payload.h" +#include "controllers/UpdatePolicyControllerService.h" + +namespace org::apache::nifi::minifi::state::response { + +class SupportedOperations : public DeviceInformation { + public: + SupportedOperations(const std::string &name, const utils::Identifier &uuid); + explicit SupportedOperations(const std::string &name); + + std::string getName() const override; + std::vector<SerializedResponseNode> serialize() override; + void setStateMonitor(const std::shared_ptr<state::StateMonitor> &monitor) { + monitor_ = monitor; + } + + void setUpdatePolicyController(const std::shared_ptr<const controllers::UpdatePolicyControllerService>& update_policy_controller) { Review comment: I think it's more expressive on the interface to use copy and move when you store a shared_ptr. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org