YAMI4 C++ Library 2.0.0
Messaging Solution for Distributed Systems
Loading...
Searching...
No Matches
agent_impl_base.h
1// Copyright Maciej Sobczak 2008-2022.
2// This file is part of YAMI4.
3// See the package-level LICENSE.txt file.
4
5#ifndef YAMICPP_AGENT_IMPL_BASE_H_INCLUDED
6#define YAMICPP_AGENT_IMPL_BASE_H_INCLUDED
7
8#include "connection_event_dispatcher_base.h"
9#include "incoming_message_dispatcher_base.h"
10#include "io_error_dispatcher_base.h"
11#include "outgoing_message_dispatcher_base.h"
12#include <yami4-core/dll.h>
13
14#include <memory>
15#include <string>
16
17namespace yami
18{
19
20class serializable;
21
22namespace details
23{
24
26{
27public:
28 virtual ~agent_impl_base() {}
29
30 virtual long long get_next_message_id() = 0;
31
32 virtual void register_object(
33 const std::string & object_name,
34 std::unique_ptr<incoming_message_dispatcher_base> & object) = 0;
35
36 virtual long long send(
37 std::unique_ptr<outgoing_message_dispatcher_base> &
38 outgoing_message_callback,
39 const std::string & target,
40 const std::string & object_name,
41 const std::string & message_name,
42 const serializable & content,
43 std::size_t priority,
44 bool auto_connect) = 0;
45
46 virtual void send(
47 std::unique_ptr<outgoing_message_dispatcher_base> &
48 outgoing_message_callback,
49 const std::string & target,
50 const serializable & header,
51 const serializable & content,
52 long long message_id,
53 std::size_t priority,
54 bool auto_connect) = 0;
55
56 virtual void register_connection_event_monitor(
57 std::unique_ptr<connection_event_dispatcher_base> & monitor) = 0;
58
59 virtual void register_io_error_logger(
60 std::unique_ptr<io_error_dispatcher_base> & logger) = 0;
61};
62
63} // namespace details
64
65} // namespace yami
66
67#endif // YAMICPP_AGENT_IMPL_BASE_H_INCLUDED
Definition: agent_impl_base.h:26
Common interface for serializable data source.
Definition: serializable.h:21
Namespace devoted to everything related to YAMI4.
Definition: agent.h:21