dfx 0.1.0
Linux-based dynamic dataflow executor
Loading...
Searching...
No Matches
Port.hpp
1// SPDX-FileCopyrightText: 2025 Vincent Leroy
2// SPDX-License-Identifier: MIT
3//
4// This file is part of dfx.
5//
6// Licensed under the MIT License. See the LICENSE file in the project root
7// for full license information.
8
9#pragma once
10
11namespace dfx::Core
12{
13class InputPort;
14class OutputPort;
15class Message;
16} // !namespace dfx::Core
17
18namespace dfx::Hooks
19{
43class Port
44{
45public:
46 virtual ~Port() = default;
47
59 virtual void onMessageSent(Core::OutputPort const & port,
60 Core::Message const & message) = 0;
61
72 virtual void onMessageReceived(Core::InputPort const & port,
73 Core::Message const & message) = 0;
74};
75} // !namespace dfx::Hooks
Incoming message endpoint attached to a node.
Definition InputPort.hpp:55
Abstract base class for messages exchanged between nodes.
Definition Message.hpp:76
Outgoing message endpoint attached to a node.
Definition OutputPort.hpp:47
Port-level message observation hook.
Definition Port.hpp:44
virtual void onMessageSent(Core::OutputPort const &port, Core::Message const &message)=0
Called when a message is sent through an output port.
virtual void onMessageReceived(Core::InputPort const &port, Core::Message const &message)=0
Called when a message is received through an input port.
Definition Channel.hpp:22
Definition Delivery.hpp:26