This is an automated email from the ASF dual-hosted git repository.

adebreceni pushed a commit to branch MINIFICPP-2669
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit 78bf0ff28735485026f7fc6e8530672f690cdf60
Author: Adam Debreceni <[email protected]>
AuthorDate: Mon Jan 5 12:53:28 2026 +0100

    Remove some virtual inhertiance fix linux build
---
 .../include/core/controller/ControllerServiceBase.h           |  3 ++-
 .../include/controllers/AttributeProviderService.h            |  4 +++-
 extension-framework/include/controllers/RecordSetReader.h     |  4 +++-
 extension-framework/include/controllers/RecordSetWriter.h     |  4 +++-
 .../include/controllers/keyvalue/KeyValueStateStorage.h       |  3 ++-
 extensions/aws/controllerservices/AWSCredentialsService.h     |  4 +++-
 .../azure/controllerservices/AzureStorageCredentialsService.h |  4 +++-
 .../couchbase/controllerservices/CouchbaseClusterService.h    |  4 +++-
 .../elasticsearch/ElasticsearchCredentialsControllerService.h |  4 +++-
 .../gcp/controllerservices/GCPCredentialsControllerService.h  |  4 +++-
 .../controllerservice/KubernetesControllerService.cpp         | 11 -----------
 .../controllerservice/KubernetesControllerService.h           |  3 +--
 extensions/smb/SmbConnectionControllerService.h               |  4 +++-
 extensions/sql/services/DatabaseService.h                     |  4 +++-
 libminifi/include/controllers/NetworkPrioritizerService.h     |  4 +++-
 libminifi/include/controllers/SSLContextService.h             |  2 ++
 libminifi/include/controllers/ThreadManagementService.h       |  4 +++-
 libminifi/include/controllers/UpdatePolicyControllerService.h |  4 +++-
 libminifi/include/core/controller/ControllerService.h         |  2 +-
 libminifi/test/integration/C2ControllerEnableFailureTest.cpp  |  4 +++-
 libminifi/test/libtest/unit/MockClasses.h                     |  4 +++-
 libminifi/test/unit/ComponentManifestTests.cpp                |  4 +++-
 libminifi/test/unit/ProcessorConfigUtilsTests.cpp             |  3 ++-
 .../include/minifi-cpp/controllers/AttributeProviderService.h |  2 +-
 minifi-api/include/minifi-cpp/controllers/RecordSetReader.h   |  2 +-
 minifi-api/include/minifi-cpp/controllers/RecordSetWriter.h   |  2 +-
 .../minifi-cpp/controllers/SSLContextServiceInterface.h       |  2 +-
 .../include/minifi-cpp/controllers/ThreadManagementService.h  |  2 +-
 .../include/minifi-cpp/core/controller/ControllerServiceApi.h |  3 ++-
 29 files changed, 65 insertions(+), 39 deletions(-)

diff --git a/core-framework/include/core/controller/ControllerServiceBase.h 
b/core-framework/include/core/controller/ControllerServiceBase.h
index a246e9460..dc49e6bc9 100644
--- a/core-framework/include/core/controller/ControllerServiceBase.h
+++ b/core-framework/include/core/controller/ControllerServiceBase.h
@@ -27,6 +27,7 @@
 #include "core/ConfigurableComponentImpl.h"
 #include "core/Connectable.h"
 #include "minifi-cpp/core/controller/ControllerServiceApi.h"
+#include "minifi-cpp/core/controller/ControllerServiceInterface.h"
 #include "minifi-cpp/core/ControllerServiceApiDefinition.h"
 #include "minifi-cpp/core/controller/ControllerServiceMetadata.h"
 
@@ -38,7 +39,7 @@ namespace org::apache::nifi::minifi::core::controller {
  * Design: OnEnable is executed when the controller service is being enabled.
  * Note that keeping state here must be protected  in this function.
  */
-class ControllerServiceBase : public virtual ControllerServiceApi {
+class ControllerServiceBase : public ControllerServiceApi {
  public:
   explicit ControllerServiceBase(ControllerServiceMetadata metadata)
       : name_(std::move(metadata.name)),
diff --git a/extension-framework/include/controllers/AttributeProviderService.h 
b/extension-framework/include/controllers/AttributeProviderService.h
index 6beb5f789..f1659321c 100644
--- a/extension-framework/include/controllers/AttributeProviderService.h
+++ b/extension-framework/include/controllers/AttributeProviderService.h
@@ -26,9 +26,11 @@
 
 namespace org::apache::nifi::minifi::controllers {
 
-class AttributeProviderServiceImpl : public 
core::controller::ControllerServiceBase, public virtual 
AttributeProviderService {
+class AttributeProviderServiceImpl : public 
core::controller::ControllerServiceBase, public AttributeProviderService {
  public:
   using ControllerServiceBase::ControllerServiceBase;
+
+  ControllerServiceInterface* getControllerServiceInterface() override {return 
this;}
 };
 
 }  // namespace org::apache::nifi::minifi::controllers
diff --git a/extension-framework/include/controllers/RecordSetReader.h 
b/extension-framework/include/controllers/RecordSetReader.h
index ad2c1a4a2..1c67cd833 100644
--- a/extension-framework/include/controllers/RecordSetReader.h
+++ b/extension-framework/include/controllers/RecordSetReader.h
@@ -22,9 +22,11 @@
 
 namespace org::apache::nifi::minifi::core {
 
-class RecordSetReaderImpl : public virtual controller::ControllerServiceBase, 
public virtual RecordSetReader {
+class RecordSetReaderImpl : public controller::ControllerServiceBase, public 
RecordSetReader {
  public:
   using ControllerServiceBase::ControllerServiceBase;
+
+  ControllerServiceInterface* getControllerServiceInterface() override {return 
this;}
 };
 
 }  // namespace org::apache::nifi::minifi::core
diff --git a/extension-framework/include/controllers/RecordSetWriter.h 
b/extension-framework/include/controllers/RecordSetWriter.h
index f5c6dd8a4..ba893cb8b 100644
--- a/extension-framework/include/controllers/RecordSetWriter.h
+++ b/extension-framework/include/controllers/RecordSetWriter.h
@@ -21,9 +21,11 @@
 
 namespace org::apache::nifi::minifi::core {
 
-class RecordSetWriterImpl : public virtual controller::ControllerServiceBase, 
public virtual RecordSetWriter {
+class RecordSetWriterImpl : public controller::ControllerServiceBase, public 
RecordSetWriter {
  public:
   using ControllerServiceBase::ControllerServiceBase;
+
+  ControllerServiceInterface* getControllerServiceInterface() override {return 
this;}
 };
 
 }  // namespace org::apache::nifi::minifi::core
diff --git 
a/extension-framework/include/controllers/keyvalue/KeyValueStateStorage.h 
b/extension-framework/include/controllers/keyvalue/KeyValueStateStorage.h
index c5bc64e19..5124cf92f 100644
--- a/extension-framework/include/controllers/keyvalue/KeyValueStateStorage.h
+++ b/extension-framework/include/controllers/keyvalue/KeyValueStateStorage.h
@@ -30,7 +30,7 @@
 
 namespace org::apache::nifi::minifi::controllers {
 
-class KeyValueStateStorage : public core::StateStorageImpl, public 
core::controller::ControllerServiceBase {
+class KeyValueStateStorage : public core::StateStorageImpl, public 
core::controller::ControllerServiceBase, public 
core::controller::ControllerServiceInterface {
  public:
   using ControllerServiceBase::ControllerServiceBase;
 
@@ -48,6 +48,7 @@ class KeyValueStateStorage : public core::StateStorageImpl, 
public core::control
   virtual bool clear() = 0;
   virtual bool update(const std::string& key, const std::function<bool(bool 
/*exists*/, std::string& /*value*/)>& update_func) = 0;
   virtual bool persist() = 0;
+  ControllerServiceInterface* getControllerServiceInterface() override {return 
this;}
 
  private:
   bool getAll(std::unordered_map<utils::Identifier, std::string>& kvs);
diff --git a/extensions/aws/controllerservices/AWSCredentialsService.h 
b/extensions/aws/controllerservices/AWSCredentialsService.h
index f28e7430d..6b785d0ba 100644
--- a/extensions/aws/controllerservices/AWSCredentialsService.h
+++ b/extensions/aws/controllerservices/AWSCredentialsService.h
@@ -37,7 +37,7 @@ class AWSCredentialsServiceTestAccessor;
 
 namespace org::apache::nifi::minifi::aws::controllers {
 
-class AWSCredentialsService : public core::controller::ControllerServiceBase {
+class AWSCredentialsService : public core::controller::ControllerServiceBase, 
public core::controller::ControllerServiceInterface {
  public:
   using ControllerServiceBase::ControllerServiceBase;
 
@@ -75,6 +75,8 @@ class AWSCredentialsService : public 
core::controller::ControllerServiceBase {
 
   void onEnable() override;
 
+  ControllerServiceInterface* getControllerServiceInterface() override {return 
this;}
+
   std::optional<Aws::Auth::AWSCredentials> getAWSCredentials();
 
  private:
diff --git 
a/extensions/azure/controllerservices/AzureStorageCredentialsService.h 
b/extensions/azure/controllerservices/AzureStorageCredentialsService.h
index 1c95851ef..38d4e7278 100644
--- a/extensions/azure/controllerservices/AzureStorageCredentialsService.h
+++ b/extensions/azure/controllerservices/AzureStorageCredentialsService.h
@@ -33,7 +33,7 @@
 
 namespace org::apache::nifi::minifi::azure::controllers {
 
-class AzureStorageCredentialsService : public 
core::controller::ControllerServiceBase {
+class AzureStorageCredentialsService : public 
core::controller::ControllerServiceBase, public 
core::controller::ControllerServiceInterface {
  public:
   EXTENSIONAPI static constexpr const char* Description = "Manages the 
credentials for an Azure Storage account. This allows for multiple Azure 
Storage related processors to reference this single "
       "controller service so that Azure storage credentials can be managed and 
controlled in a central location.";
@@ -91,6 +91,8 @@ class AzureStorageCredentialsService : public 
core::controller::ControllerServic
 
   void onEnable() override;
 
+  ControllerServiceInterface* getControllerServiceInterface() override {return 
this;}
+
   storage::AzureStorageCredentials getCredentials() const {
     return credentials_;
   }
diff --git a/extensions/couchbase/controllerservices/CouchbaseClusterService.h 
b/extensions/couchbase/controllerservices/CouchbaseClusterService.h
index a2e9d8ead..7d854d2e1 100644
--- a/extensions/couchbase/controllerservices/CouchbaseClusterService.h
+++ b/extensions/couchbase/controllerservices/CouchbaseClusterService.h
@@ -101,7 +101,7 @@ class CouchbaseClient {
 
 namespace controllers {
 
-class CouchbaseClusterService : public core::controller::ControllerServiceBase 
{
+class CouchbaseClusterService : public 
core::controller::ControllerServiceBase, public 
core::controller::ControllerServiceInterface {
  public:
   using ControllerServiceBase::ControllerServiceBase;
 
@@ -137,6 +137,8 @@ class CouchbaseClusterService : public 
core::controller::ControllerServiceBase {
     }
   }
 
+  ControllerServiceInterface* getControllerServiceInterface() override {return 
this;}
+
   virtual nonstd::expected<CouchbaseUpsertResult, CouchbaseErrorType> 
upsert(const CouchbaseCollection& collection, CouchbaseValueType document_type,
       const std::string& document_id, const std::vector<std::byte>& buffer, 
const ::couchbase::upsert_options& options) {
     gsl_Expects(client_);
diff --git 
a/extensions/elasticsearch/ElasticsearchCredentialsControllerService.h 
b/extensions/elasticsearch/ElasticsearchCredentialsControllerService.h
index a75a669f3..8b428c0c2 100644
--- a/extensions/elasticsearch/ElasticsearchCredentialsControllerService.h
+++ b/extensions/elasticsearch/ElasticsearchCredentialsControllerService.h
@@ -30,7 +30,7 @@
 
 namespace org::apache::nifi::minifi::extensions::elasticsearch {
 
-class ElasticsearchCredentialsControllerService : public 
core::controller::ControllerServiceBase {
+class ElasticsearchCredentialsControllerService : public 
core::controller::ControllerServiceBase, public 
core::controller::ControllerServiceInterface {
  public:
   EXTENSIONAPI static constexpr const char* Description = 
"Elasticsearch/Opensearch Credentials Controller Service";
 
@@ -63,6 +63,8 @@ class ElasticsearchCredentialsControllerService : public 
core::controller::Contr
 
   void onEnable() override;
 
+  ControllerServiceInterface* getControllerServiceInterface() override {return 
this;}
+
   void authenticateClient(http::HTTPClient& client);
 
  private:
diff --git 
a/extensions/gcp/controllerservices/GCPCredentialsControllerService.h 
b/extensions/gcp/controllerservices/GCPCredentialsControllerService.h
index 06894fe44..acc6888e2 100644
--- a/extensions/gcp/controllerservices/GCPCredentialsControllerService.h
+++ b/extensions/gcp/controllerservices/GCPCredentialsControllerService.h
@@ -63,7 +63,7 @@ constexpr customize_t 
enum_name<CredentialsLocation>(CredentialsLocation value)
 
 namespace org::apache::nifi::minifi::extensions::gcp {
 
-class GCPCredentialsControllerService : public 
core::controller::ControllerServiceBase {
+class GCPCredentialsControllerService : public 
core::controller::ControllerServiceBase, public 
core::controller::ControllerServiceInterface {
  public:
   EXTENSIONAPI static constexpr const char* Description = "Manages the 
credentials for Google Cloud Platform. This allows for multiple Google Cloud 
Platform related processors "
       "to reference this single controller service so that Google Cloud 
Platform credentials can be managed and controlled in a central location.";
@@ -98,6 +98,8 @@ class GCPCredentialsControllerService : public 
core::controller::ControllerServi
 
   void onEnable() override;
 
+  ControllerServiceInterface* getControllerServiceInterface() override {return 
this;}
+
   [[nodiscard]] const auto& getCredentials() const { return credentials_; }
 
  protected:
diff --git 
a/extensions/kubernetes/controllerservice/KubernetesControllerService.cpp 
b/extensions/kubernetes/controllerservice/KubernetesControllerService.cpp
index c7656676e..580970a06 100644
--- a/extensions/kubernetes/controllerservice/KubernetesControllerService.cpp
+++ b/extensions/kubernetes/controllerservice/KubernetesControllerService.cpp
@@ -31,17 +31,6 @@ extern "C" {
 
 namespace org::apache::nifi::minifi::controllers {
 
-KubernetesControllerService::KubernetesControllerService(const 
std::string_view name, const utils::Identifier& uuid)
-  : AttributeProviderServiceImpl(name, uuid),
-    
logger_{core::logging::LoggerFactory<KubernetesControllerService>::getLogger(uuid)}
 {
-}
-
-KubernetesControllerService::KubernetesControllerService(const 
std::string_view name, const std::shared_ptr<Configure>& configuration)
-  : KubernetesControllerService{name} {
-    setConfiguration(configuration);
-    initialize();
-}
-
 void KubernetesControllerService::initialize() {
   std::lock_guard<std::mutex> lock(initialization_mutex_);
   if (initialized_) { return; }
diff --git 
a/extensions/kubernetes/controllerservice/KubernetesControllerService.h 
b/extensions/kubernetes/controllerservice/KubernetesControllerService.h
index 2b235cda1..90eb29032 100644
--- a/extensions/kubernetes/controllerservice/KubernetesControllerService.h
+++ b/extensions/kubernetes/controllerservice/KubernetesControllerService.h
@@ -33,8 +33,7 @@ namespace org::apache::nifi::minifi::controllers {
 
 class KubernetesControllerService : public AttributeProviderServiceImpl {
  public:
-  explicit KubernetesControllerService(const std::string_view name, const 
utils::Identifier& uuid = {});
-  KubernetesControllerService(const std::string_view name, const 
std::shared_ptr<Configure>& configuration);
+  using AttributeProviderServiceImpl::AttributeProviderServiceImpl;
 
   EXTENSIONAPI static constexpr const char* Description = "Controller service 
that provides access to the Kubernetes API";
 
diff --git a/extensions/smb/SmbConnectionControllerService.h 
b/extensions/smb/SmbConnectionControllerService.h
index 9277f05d0..84eb2f38e 100644
--- a/extensions/smb/SmbConnectionControllerService.h
+++ b/extensions/smb/SmbConnectionControllerService.h
@@ -34,7 +34,7 @@
 
 namespace org::apache::nifi::minifi::extensions::smb {
 
-class SmbConnectionControllerService : public 
core::controller::ControllerServiceBase {
+class SmbConnectionControllerService : public 
core::controller::ControllerServiceBase, public 
core::controller::ControllerServiceInterface {
  public:
   EXTENSIONAPI static constexpr const char* Description = "SMB Connection 
Controller Service";
 
@@ -77,6 +77,8 @@ class SmbConnectionControllerService : public 
core::controller::ControllerServic
   void onEnable() override;
   void notifyStop() override;
 
+  ControllerServiceInterface* getControllerServiceInterface() override {return 
this;}
+
   virtual std::error_code validateConnection();
   virtual std::filesystem::path getPath() const { return server_path_; }
 
diff --git a/extensions/sql/services/DatabaseService.h 
b/extensions/sql/services/DatabaseService.h
index 365ec9431..742baa6cf 100644
--- a/extensions/sql/services/DatabaseService.h
+++ b/extensions/sql/services/DatabaseService.h
@@ -34,7 +34,7 @@ namespace org::apache::nifi::minifi::sql::controllers {
  * services to internal services. While a controller service is generally 
configured from the flow,
  * we want to follow the open closed principle and provide Database services
  */
-class DatabaseService : public core::controller::ControllerServiceBase {
+class DatabaseService : public core::controller::ControllerServiceBase, public 
core::controller::ControllerServiceInterface {
  public:
   using ControllerServiceBase::ControllerServiceBase;
 
@@ -52,6 +52,8 @@ class DatabaseService : public 
core::controller::ControllerServiceBase {
 
   void onEnable() override;
 
+  ControllerServiceInterface* getControllerServiceInterface() override {return 
this;}
+
   virtual std::unique_ptr<sql::Connection> getConnection() const = 0;
 
  protected:
diff --git a/libminifi/include/controllers/NetworkPrioritizerService.h 
b/libminifi/include/controllers/NetworkPrioritizerService.h
index 6e30ad9bb..6e8e8593b 100644
--- a/libminifi/include/controllers/NetworkPrioritizerService.h
+++ b/libminifi/include/controllers/NetworkPrioritizerService.h
@@ -39,7 +39,7 @@ namespace org::apache::nifi::minifi::controllers {
 /**
  * Purpose: Network prioritizer for selecting network interfaces through the 
flow configuration.
  */
-class NetworkPrioritizerService : public 
core::controller::ControllerServiceBase {
+class NetworkPrioritizerService : public 
core::controller::ControllerServiceBase, public 
core::controller::ControllerServiceInterface {
   class StandardNetworkPrioritizer : public io::NetworkPrioritizer {
    public:
     void reduce_tokens(uint32_t size) override;
@@ -102,6 +102,8 @@ class NetworkPrioritizerService : public 
core::controller::ControllerServiceBase
 
   void onEnable() override;
 
+  ControllerServiceInterface* getControllerServiceInterface() override {return 
this;}
+
   io::NetworkInterface getInterface(uint32_t size);
 
  protected:
diff --git a/libminifi/include/controllers/SSLContextService.h 
b/libminifi/include/controllers/SSLContextService.h
index b5ff22a2c..fbae98dde 100644
--- a/libminifi/include/controllers/SSLContextService.h
+++ b/libminifi/include/controllers/SSLContextService.h
@@ -84,6 +84,8 @@ class SSLContextService : public 
core::controller::ControllerServiceBase, public
 
   void initialize() override;
 
+  ControllerServiceInterface* getControllerServiceInterface() override {return 
this;}
+
   std::unique_ptr<SSLContext> createSSLContext();
 
   const std::filesystem::path& getCertificateFile() const override;
diff --git a/libminifi/include/controllers/ThreadManagementService.h 
b/libminifi/include/controllers/ThreadManagementService.h
index 54905205f..30681b341 100644
--- a/libminifi/include/controllers/ThreadManagementService.h
+++ b/libminifi/include/controllers/ThreadManagementService.h
@@ -34,7 +34,7 @@ namespace org::apache::nifi::minifi::controllers {
  * Purpose: Thread management service provides a contextual awareness across
  * thread pools that enables us to deliver QOS to an agent.
  */
-class ThreadManagementServiceImpl : public 
core::controller::ControllerServiceBase, public virtual ThreadManagementService 
{
+class ThreadManagementServiceImpl : public 
core::controller::ControllerServiceBase, public ThreadManagementService {
  public:
   explicit ThreadManagementServiceImpl(std::string_view name, const 
utils::Identifier &uuid = {})
       : ControllerServiceBase(name, uuid),
@@ -72,6 +72,8 @@ class ThreadManagementServiceImpl : public 
core::controller::ControllerServiceBa
   void onEnable() override {
   }
 
+  ControllerServiceInterface* getControllerServiceInterface() override {return 
this;}
+
  protected:
   std::atomic<int> thread_count_;
 
diff --git a/libminifi/include/controllers/UpdatePolicyControllerService.h 
b/libminifi/include/controllers/UpdatePolicyControllerService.h
index 15ab8bdde..df547ecb7 100644
--- a/libminifi/include/controllers/UpdatePolicyControllerService.h
+++ b/libminifi/include/controllers/UpdatePolicyControllerService.h
@@ -38,7 +38,7 @@ namespace org::apache::nifi::minifi::controllers {
  * Purpose: UpdatePolicyControllerService allows a flow specific policy on 
allowing or disallowing updates.
  * Since the flow dictates the purpose of a device it will also be used to 
dictate updates to specific components.
  */
-class UpdatePolicyControllerService : public 
core::controller::ControllerServiceBase {
+class UpdatePolicyControllerService : public 
core::controller::ControllerServiceBase, public 
core::controller::ControllerServiceInterface {
  public:
   using ControllerServiceBase::ControllerServiceBase;
 
@@ -77,6 +77,8 @@ class UpdatePolicyControllerService : public 
core::controller::ControllerService
 
   void onEnable() override;
 
+  ControllerServiceInterface* getControllerServiceInterface() override {return 
this;}
+
   bool canUpdate(const std::string &property) const {
     return policy_->canUpdate(property);
   }
diff --git a/libminifi/include/core/controller/ControllerService.h 
b/libminifi/include/core/controller/ControllerService.h
index 3851aa3b0..a0f67afe2 100644
--- a/libminifi/include/core/controller/ControllerService.h
+++ b/libminifi/include/core/controller/ControllerService.h
@@ -103,7 +103,7 @@ class ControllerService : public ConfigurableComponentImpl, 
public CoreComponent
     ControllerServiceContextImpl context{*this};
     std::vector<std::shared_ptr<ControllerServiceInterface>> 
service_interfaces;
     for (auto& service : linked_services_) {
-      
service_interfaces.emplace_back(std::shared_ptr<ControllerServiceInterface>(service,
 service->impl_.get()));
+      
service_interfaces.emplace_back(std::shared_ptr<ControllerServiceInterface>(service,
 service->impl_->getControllerServiceInterface()));
     }
     impl_->onEnable(context, configuration_, service_interfaces);
   }
diff --git a/libminifi/test/integration/C2ControllerEnableFailureTest.cpp 
b/libminifi/test/integration/C2ControllerEnableFailureTest.cpp
index 0052069c3..e3dc24e1a 100644
--- a/libminifi/test/integration/C2ControllerEnableFailureTest.cpp
+++ b/libminifi/test/integration/C2ControllerEnableFailureTest.cpp
@@ -31,7 +31,7 @@ using namespace std::literals::chrono_literals;
 
 namespace org::apache::nifi::minifi::test {
 
-class DummyController : public core::controller::ControllerServiceBase {
+class DummyController : public core::controller::ControllerServiceBase, public 
core::controller::ControllerServiceInterface {
  public:
   using ControllerServiceBase::ControllerServiceBase;
 
@@ -48,6 +48,8 @@ class DummyController : public 
core::controller::ControllerServiceBase {
     setSupportedProperties(Properties);
   }
 
+  ControllerServiceInterface* getControllerServiceInterface() override {return 
this;}
+
   void onEnable() override {
     auto dummy_controller_property = getProperty(DummyControllerProperty.name);
     if (!dummy_controller_property || dummy_controller_property->empty()) {
diff --git a/libminifi/test/libtest/unit/MockClasses.h 
b/libminifi/test/libtest/unit/MockClasses.h
index b1c3503fe..92131519f 100644
--- a/libminifi/test/libtest/unit/MockClasses.h
+++ b/libminifi/test/libtest/unit/MockClasses.h
@@ -35,7 +35,7 @@ std::mutex control_mutex;
 std::atomic<bool> subprocess_controller_service_found_correctly{false};
 std::atomic<bool> subprocess_controller_service_not_found_correctly{false};
 
-class MockControllerService : public 
minifi::core::controller::ControllerServiceBase {
+class MockControllerService : public 
minifi::core::controller::ControllerServiceBase, public 
core::controller::ControllerServiceInterface {
  public:
   using ControllerServiceBase::ControllerServiceBase;
   MockControllerService()
@@ -60,6 +60,8 @@ class MockControllerService : public 
minifi::core::controller::ControllerService
     str = "pushitrealgood";
   }
 
+  ControllerServiceInterface* getControllerServiceInterface() override {return 
this;}
+
  protected:
   std::string str;
 };
diff --git a/libminifi/test/unit/ComponentManifestTests.cpp 
b/libminifi/test/unit/ComponentManifestTests.cpp
index 76b89dda0..862933449 100644
--- a/libminifi/test/unit/ComponentManifestTests.cpp
+++ b/libminifi/test/unit/ComponentManifestTests.cpp
@@ -40,10 +40,12 @@ SerializedResponseNode& get(SerializedResponseNode& node, 
const std::string& fie
 
 namespace test::apple {
 
-class ExampleService : public core::controller::ControllerServiceBase {
+class ExampleService : public core::controller::ControllerServiceBase, public 
core::controller::ControllerServiceInterface {
  public:
   using ControllerServiceBase::ControllerServiceBase;
 
+  ControllerServiceInterface* getControllerServiceInterface() override {return 
this;}
+
   static constexpr const char* Description = "An example service";
   static constexpr auto Properties = std::array<core::PropertyReference, 0>{};
   static constexpr bool SupportsDynamicProperties = false;
diff --git a/libminifi/test/unit/ProcessorConfigUtilsTests.cpp 
b/libminifi/test/unit/ProcessorConfigUtilsTests.cpp
index 8b90abd33..298faa228 100644
--- a/libminifi/test/unit/ProcessorConfigUtilsTests.cpp
+++ b/libminifi/test/unit/ProcessorConfigUtilsTests.cpp
@@ -92,9 +92,10 @@ TEST_CASE("Parse enum property") {
 }
 
 namespace {
-class TestControllerService : public controller::ControllerServiceBase {
+class TestControllerService : public controller::ControllerServiceBase, public 
core::controller::ControllerServiceInterface {
  public:
   using ControllerServiceBase::ControllerServiceBase;
+  ControllerServiceInterface* getControllerServiceInterface() override {return 
this;}
 };
 
 const std::shared_ptr test_controller_service = []() {
diff --git 
a/minifi-api/include/minifi-cpp/controllers/AttributeProviderService.h 
b/minifi-api/include/minifi-cpp/controllers/AttributeProviderService.h
index 2211e4c5f..0b54b773c 100644
--- a/minifi-api/include/minifi-cpp/controllers/AttributeProviderService.h
+++ b/minifi-api/include/minifi-cpp/controllers/AttributeProviderService.h
@@ -25,7 +25,7 @@
 
 namespace org::apache::nifi::minifi::controllers {
 
-class AttributeProviderService : public virtual 
core::controller::ControllerServiceInterface {
+class AttributeProviderService : public 
core::controller::ControllerServiceInterface {
  public:
   using AttributeMap = std::unordered_map<std::string, std::string>;
   virtual std::optional<std::vector<AttributeMap>> getAttributes() = 0;
diff --git a/minifi-api/include/minifi-cpp/controllers/RecordSetReader.h 
b/minifi-api/include/minifi-cpp/controllers/RecordSetReader.h
index 0b00a92a1..1732c831f 100644
--- a/minifi-api/include/minifi-cpp/controllers/RecordSetReader.h
+++ b/minifi-api/include/minifi-cpp/controllers/RecordSetReader.h
@@ -26,7 +26,7 @@
 
 namespace org::apache::nifi::minifi::core {
 
-class RecordSetReader : public virtual controller::ControllerServiceInterface {
+class RecordSetReader : public controller::ControllerServiceInterface {
  public:
   static constexpr auto ProvidesApi = core::ControllerServiceApiDefinition{
     .artifact = "minifi-system",
diff --git a/minifi-api/include/minifi-cpp/controllers/RecordSetWriter.h 
b/minifi-api/include/minifi-cpp/controllers/RecordSetWriter.h
index d43e3471e..b44cb8d1a 100644
--- a/minifi-api/include/minifi-cpp/controllers/RecordSetWriter.h
+++ b/minifi-api/include/minifi-cpp/controllers/RecordSetWriter.h
@@ -26,7 +26,7 @@
 
 namespace org::apache::nifi::minifi::core {
 
-class RecordSetWriter : public virtual controller::ControllerServiceInterface {
+class RecordSetWriter : public controller::ControllerServiceInterface {
  public:
   static constexpr auto ProvidesApi = core::ControllerServiceApiDefinition{
     .artifact = "minifi-system",
diff --git 
a/minifi-api/include/minifi-cpp/controllers/SSLContextServiceInterface.h 
b/minifi-api/include/minifi-cpp/controllers/SSLContextServiceInterface.h
index fb55809bb..3876a538a 100644
--- a/minifi-api/include/minifi-cpp/controllers/SSLContextServiceInterface.h
+++ b/minifi-api/include/minifi-cpp/controllers/SSLContextServiceInterface.h
@@ -35,7 +35,7 @@ namespace org::apache::nifi::minifi::controllers {
  * Justification: Abstracts SSL support out of processors into a
  * configurable controller service.
  */
-class SSLContextServiceInterface : public virtual 
core::controller::ControllerServiceInterface {
+class SSLContextServiceInterface : public 
core::controller::ControllerServiceInterface {
  public:
   static constexpr auto ProvidesApi = core::ControllerServiceApiDefinition{
     .artifact = "minifi-system",
diff --git 
a/minifi-api/include/minifi-cpp/controllers/ThreadManagementService.h 
b/minifi-api/include/minifi-cpp/controllers/ThreadManagementService.h
index 924a566a3..6ba9d08a8 100644
--- a/minifi-api/include/minifi-cpp/controllers/ThreadManagementService.h
+++ b/minifi-api/include/minifi-cpp/controllers/ThreadManagementService.h
@@ -33,7 +33,7 @@ namespace org::apache::nifi::minifi::controllers {
  * Purpose: Thread management service provides a contextual awareness across
  * thread pools that enables us to deliver QOS to an agent.
  */
-class ThreadManagementService : public virtual 
core::controller::ControllerServiceInterface {
+class ThreadManagementService : public 
core::controller::ControllerServiceInterface {
  public:
   /**
    * Helps to determine if the number of tasks will increase the pools above 
their threshold.
diff --git 
a/minifi-api/include/minifi-cpp/core/controller/ControllerServiceApi.h 
b/minifi-api/include/minifi-cpp/core/controller/ControllerServiceApi.h
index 3a61812fe..27049c169 100644
--- a/minifi-api/include/minifi-cpp/core/controller/ControllerServiceApi.h
+++ b/minifi-api/include/minifi-cpp/core/controller/ControllerServiceApi.h
@@ -23,13 +23,14 @@
 
 namespace org::apache::nifi::minifi::core::controller {
 
-class ControllerServiceApi : public ControllerServiceInterface {
+class ControllerServiceApi {
   public:
     virtual ~ControllerServiceApi() = default;
 
     virtual void initialize(ControllerServiceDescriptor& descriptor) = 0;
     virtual void onEnable(ControllerServiceContext& context, const 
std::shared_ptr<Configure>& configuration, const 
std::vector<std::shared_ptr<ControllerServiceInterface>>& linked_services) = 0;
     virtual void notifyStop() = 0;
+    virtual ControllerServiceInterface* getControllerServiceInterface() = 0;
 };
 
 }  // namespace org::apache::nifi::minifi::core::controller

Reply via email to