std::atomic StreamFactory::context_instance_; std::mutex StreamFactory::context_mutex_;
| 79 | // std::atomic<StreamFactory*> StreamFactory::context_instance_; |
| 80 | // std::mutex StreamFactory::context_mutex_; |
| 81 | StreamFactory::StreamFactory(const std::shared_ptr<Configure> &configure) { |
| 82 | std::string secureStr; |
| 83 | bool is_secure = false; |
| 84 | if (configure->get(Configure::nifi_remote_input_secure, secureStr) && org::apache::nifi::minifi::utils::StringUtils::StringToBool(secureStr, is_secure)) { |
| 85 | #ifdef OPENSSL_SUPPORT |
| 86 | delegate_ = std::make_shared<SocketCreator<TLSSocket, TLSContext>>(configure); |
| 87 | #else |
| 88 | delegate_ = std::make_shared<SocketCreator<Socket, SocketContext>>(configure); |
| 89 | #endif |
| 90 | } else { |
| 91 | delegate_ = std::make_shared<SocketCreator<Socket, SocketContext>>(configure); |
| 92 | } |
| 93 | } |
| 94 | } // namespace io |
| 95 | } // namespace minifi |
| 96 | } // namespace nifi |