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

Method onEnable

extensions/jni/jvm/JavaControllerService.cpp:78–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78void JavaControllerService::onEnable() {
79 std::vector<std::string> pathOrFiles;
80
81 core::Property prop = NarDirectory;
82
83 std::string nardir, narscratch, nardocs;
84 if (getProperty(NarDirectory.getName(), prop)) {
85 nardir = prop.getValue().to_string();
86 }
87
88 prop = NarDeploymentDirectory;
89
90 if (getProperty(NarDeploymentDirectory.getName(), prop)) {
91 narscratch = prop.getValue().to_string();
92 }
93
94 prop = NarDocumentDirectory;
95
96 if (getProperty(NarDocumentDirectory.getName(), prop)) {
97 nardocs = prop.getValue().to_string();
98 }
99
100 for (const auto &path : pathOrFiles) {
101 utils::file::FileUtils::addFilesMatchingExtension(logger_, path, ".jar", classpaths_);
102 }
103
104 loader = JVMLoader::getInstance();
105
106 narClassLoaderClazz = loadClass("org/apache/nifi/processor/JniClassLoader");
107
108 nar_loader_ = std::unique_ptr<NarClassLoader>(new NarClassLoader(shared_from_this(), narClassLoaderClazz, nardir, narscratch, nardocs));
109
110}
111
112} /* namespace controllers */
113} /* namespace jni */

Callers 1

configureMethod · 0.45

Calls 4

getNameMethod · 0.45
to_stringMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected