Public Member Functions | Protected Member Functions | Private Attributes | List of all members
swarmio::Mailbox Class Reference

Abstract base class for Mailbox implementations. More...

#include <Mailbox.h>

Inheritance diagram for swarmio::Mailbox:
Inheritance graph
[legend]

Public Member Functions

virtual void Disconnect ()
 Disconnect this Mailbox from the Endpoint. More...
 
EndpointGetEndpoint ()
 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...
 
Mailboxoperator= (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...
 

Detailed Description

Abstract base class for Mailbox implementations.

Definition at line 13 of file Mailbox.h.

Constructor & Destructor Documentation

swarmio::Mailbox::Mailbox ( )
inlineprotected

Construct a disconnected Mailbox.

Definition at line 29 of file Mailbox.h.

swarmio::Mailbox::Mailbox ( Endpoint endpoint)
inlineprotected

Construct a new Mailbox object.

Parameters
endpointEndpoint

Definition at line 37 of file Mailbox.h.

swarmio::Mailbox::Mailbox ( Mailbox &&  other)
inlineprotected

Move a Mailbox object.

Definition at line 58 of file Mailbox.h.

swarmio::Mailbox::Mailbox ( const Mailbox )
delete

Remove copy constructor.

virtual swarmio::Mailbox::~Mailbox ( )
inlinevirtual

Destroy the Mailbox object.

Definition at line 165 of file Mailbox.h.

Member Function Documentation

virtual void swarmio::Mailbox::Disconnect ( )
inlinevirtual

Disconnect this Mailbox from the Endpoint.

Definition at line 153 of file Mailbox.h.

void swarmio::Mailbox::FinishConstruction ( )
inlineprotected

Called when the last constructor has finished its job.

Definition at line 46 of file Mailbox.h.

void swarmio::Mailbox::FinishMovingTo ( Mailbox other)
inlineprotected

Called when message handling should be passed onto the new instance.

Parameters
otherNew Mailbox

Definition at line 70 of file Mailbox.h.

Endpoint* swarmio::Mailbox::GetEndpoint ( )
inline

Get the associated Endpoint.

Returns
Endpoint*

Definition at line 144 of file Mailbox.h.

virtual void swarmio::Mailbox::MailboxWasConnected ( )
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.

Definition at line 130 of file Mailbox.h.

virtual void swarmio::Mailbox::MailboxWillBeDisconnected ( )
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.

Definition at line 137 of file Mailbox.h.

virtual void swarmio::Mailbox::NodeDidJoin ( const Node node)
inlinevirtualnoexcept

Called when a new Node has joined the group.

Parameters
nodeThe node that has been discovered

Reimplemented in swarmio::services::discovery::Service, and swarmros::bridge::Node.

Definition at line 116 of file Mailbox.h.

virtual void swarmio::Mailbox::NodeWasDiscovered ( const Node node)
inlinevirtualnoexcept

Called when a new Node has been discovered.

Parameters
nodeThe node that has been discovered

Reimplemented in swarmros::bridge::Node, and swarmio::tool::Loop.

Definition at line 109 of file Mailbox.h.

virtual void swarmio::Mailbox::NodeWillLeave ( const Node node)
inlinevirtualnoexcept

Called when a Node signals that it will leave.

Parameters
nodeThe node that has left

Reimplemented in swarmio::services::discovery::Service, and swarmros::bridge::Node.

Definition at line 123 of file Mailbox.h.

Mailbox& swarmio::Mailbox::operator= ( const Mailbox )
delete

Remove assignment operator.

Returns
Awaiter&
virtual bool swarmio::Mailbox::ReceiveMessage ( const Node sender,
const data::Message *  message 
)
inlinevirtual

Member Data Documentation

Endpoint* swarmio::Mailbox::_endpoint
private

Associated endpoint.

Definition at line 21 of file Mailbox.h.


The documentation for this class was generated from the following file:


swarmros
Author(s):
autogenerated on Fri Apr 3 2020 03:42:48