33 using plugin_base_t::plugin_base_t;
38 const std::type_index &
identity() const noexcept override;
43 virtual
void on_link_request(message::link_request_t &message) noexcept;
46 virtual
void on_unlink_response(message::unlink_response_t &message) noexcept;
49 virtual
void on_unlink_notify(message::unlink_notify_t &message) noexcept;
51 bool handle_shutdown(message::shutdown_request_t *message) noexcept override;
52 void handle_start(message::start_trigger_t *message) noexcept override;
55 virtual
bool has_clients() noexcept {
return !linked_clients.empty(); }
61 template <typename T> auto &access() noexcept;
64 enum class link_state_t { PENDING, OPERATIONAL, UNLINKING };
66 using request_option_t = std::optional<request_id_t>;
68 link_info_t(link_state_t state_, link_request_ptr_t request_) noexcept : state{state_}, request{request_} {}
70 link_request_ptr_t request;
71 request_option_t unlink_request;
72 bool shutdown_notified =
false;
75 using linked_clients_t = std::unordered_map<address_ptr_t, link_info_t>;
76 linked_clients_t linked_clients;