Endpoint.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <swarmio/Node.h>
4 #include <swarmio/data/Message.pb.h>
5 
6 namespace swarmio
7 {
8 
13  class Mailbox;
14 
25  class SWARMIO_API Endpoint
26  {
27  protected:
28 
33  friend Mailbox;
34 
45  virtual void RegisterMailbox(Mailbox* mailbox) = 0;
46 
54  virtual void UnregisterMailbox(Mailbox* mailbox)= 0;
55 
63  virtual void ReplaceMailbox(Mailbox* oldMailbox, Mailbox* newMailbox) = 0;
64 
65  public:
66 
72  virtual void Start() = 0;
73 
81  virtual void Stop() = 0;
82 
90  virtual void Tag(data::Message* message) = 0;
91 
102  virtual void Send(data::Message* message, const Node* node) = 0;
103 
110  virtual const Node* NodeForUUID(const std::string& uuid) = 0;
111 
117  virtual const std::string& GetUUID() = 0;
118 
123  virtual ~Endpoint() { }
124  };
125 }
virtual ~Endpoint()
Destroy the Endpoint object.
Definition: Endpoint.h:123
friend Mailbox
Allow Mailboxes to register themselves.
Definition: Endpoint.h:33
Abstract base class for Endpoint implementations.
Definition: Endpoint.h:25
Represents a Node the Endpoint knows about and can send messages to.
Abstract base class for Mailbox implementations.
Definition: Mailbox.h:13


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