Abstract base class for Mailbox implementations. More...
#include <Mailbox.h>
Public Member Functions | |
virtual void | Disconnect () |
Disconnect this Mailbox from the Endpoint. More... | |
Endpoint * | GetEndpoint () |
Get the associated Endpoint. More... | |
Mailbox (const Mailbox &)=delete | |
Remove copy constructor. More... | |
virtual void | MailboxWasConnected () noexcept |
Called when the mailbox is attached to an already running endpoint or if the attached endpoint has just started. More... | |
virtual void | MailboxWillBeDisconnected () noexcept |
Called right before the mailbox is disconnected from its endpoint or if the attached endpoint is about to stop. More... | |
virtual void | NodeDidJoin (const Node *node) noexcept |
Called when a new Node has joined the group. More... | |
virtual void | NodeWasDiscovered (const Node *node) noexcept |
Called when a new Node has been discovered. More... | |
virtual void | NodeWillLeave (const Node *node) noexcept |
Called when a Node signals that it will leave. More... | |
Mailbox & | operator= (const Mailbox &)=delete |
Remove assignment operator. More... | |
virtual bool | ReceiveMessage (const Node *sender, const data::Message *message) |
Delivery point of all messages. More... | |
virtual | ~Mailbox () |
Destroy the Mailbox object. More... | |
Protected Member Functions | |
void | FinishConstruction () |
Called when the last constructor has finished its job. More... | |
void | FinishMovingTo (Mailbox *other) |
Called when message handling should be passed onto the new instance. More... | |
Mailbox () | |
Construct a disconnected Mailbox. More... | |
Mailbox (Endpoint *endpoint) | |
Construct a new Mailbox object. More... | |
Mailbox (Mailbox &&other) | |
Move a Mailbox object. More... | |
Private Attributes | |
Endpoint * | _endpoint |
Associated endpoint. More... | |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
delete |
Remove copy constructor.
|
inlinevirtual |
|
inlinevirtual |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inlinevirtualnoexcept |
Called when the mailbox is attached to an already running endpoint or if the attached endpoint has just started.
Reimplemented in swarmio::services::PeriodicService.
|
inlinevirtualnoexcept |
Called right before the mailbox is disconnected from its endpoint or if the attached endpoint is about to stop.
Reimplemented in swarmio::services::telemetry::UpdateAwaiter, and swarmio::services::PeriodicService.
|
inlinevirtualnoexcept |
Called when a new Node has joined the group.
node | The node that has been discovered |
Reimplemented in swarmio::services::discovery::Service, and swarmros::bridge::Node.
|
inlinevirtualnoexcept |
Called when a new Node has been discovered.
node | The node that has been discovered |
Reimplemented in swarmros::bridge::Node, and swarmio::tool::Loop.
|
inlinevirtualnoexcept |
Called when a Node signals that it will leave.
node | The node that has left |
Reimplemented in swarmio::services::discovery::Service, and swarmros::bridge::Node.
Remove assignment operator.
|
inlinevirtual |
Delivery point of all messages.
sender | The node that has sent the message |
message | The message itself |
Reimplemented in swarmio::services::telemetry::Service, swarmio::services::discovery::Service, swarmio::services::Awaiter< T >, swarmio::services::Awaiter< std::chrono::nanoseconds >, swarmio::services::Awaiter< data::discovery::Response >, swarmio::services::Awaiter< bool >, swarmio::services::Awaiter< data::Variant >, swarmio::services::Awaiter< data::telemetry::Update >, swarmio::services::keyvalue::Service, swarmio::simulator::ExampleDevice, swarmio::services::event::Service, and swarmio::services::ping::Service.
|
private |