| 67 | public: |
| 68 | |
| 69 | explicit Instance(const std::string &url, const std::string &port, const std::string &repo_class_name = "") |
| 70 | : no_op_repo_(std::make_shared<minifi::core::Repository>()), |
| 71 | url_(url), |
| 72 | configure_(std::make_shared<Configure>()) { |
| 73 | |
| 74 | if (repo_class_name == "filesystemrepository") { |
| 75 | content_repo_ = std::make_shared<minifi::core::repository::FileSystemRepository>(); |
| 76 | } else { |
| 77 | content_repo_ = std::make_shared<minifi::core::repository::VolatileContentRepository>(); |
| 78 | } |
| 79 | char * cwd = get_current_working_directory(); |
| 80 | if (cwd) { |
| 81 | configure_->setHome(std::string(cwd)); |
| 82 | free(cwd); |
| 83 | } |
| 84 | running_ = false; |
| 85 | stream_factory_ = minifi::io::StreamFactory::getInstance(configure_); |
| 86 | utils::Identifier uuid; |
| 87 | uuid = port; |
| 88 | rpg_ = std::make_shared<minifi::RemoteProcessorGroupPort>(stream_factory_, url, url, configure_, uuid); |
| 89 | proc_node_ = std::make_shared<core::ProcessorNode>(rpg_); |
| 90 | core::FlowConfiguration::initialize_static_functions(); |
| 91 | content_repo_->initialize(configure_); |
| 92 | } |
| 93 | |
| 94 | ~Instance() { |
| 95 | running_ = false; |
nothing calls this directly
no test coverage detected