Abstract base class for all source transports that inject messages into a Channel.
More...
#include <dfx-core/transports/sources/SourceTransport.hpp>
|
| | SourceTransport (Endpoint endpoint, nlohmann::json config) |
| | Constructs a SourceTransport with the Role::Source role.
|
| | Transport (Role role, Endpoint endpoint, nlohmann::json config) |
| | Constructs a transport instance.
|
| | DFX_DISABLE_COPY_AND_MOVE (Transport) |
| | Transport is not copiable nor movable.
|
| virtual | ~Transport ()=default |
| | Virtual destructor ensuring proper cleanup of derived transports.
|
| template<DerivedFromTransport T> |
| bool | is () const noexcept |
| | Check whether this transport is of a given derived type.
|
| template<DerivedFromTransport T> |
| T & | as () noexcept |
| | Cast this transport to a derived type (unchecked).
|
| template<DerivedFromTransport T> |
| T const & | as () const noexcept |
| | Cast this transport to a derived type (unchecked).
|
| virtual void | start (FdWatch::Poller &poller)=0 |
| | Activates the transport and begins I/O operations.
|
| virtual void | stop () noexcept=0 |
| | Deactivates the transport and releases system resources.
|
| Role | role () const noexcept |
| | Returns the Role (Source or Destination) of this transport.
|
| bool | isSource () const noexcept |
| | Returns true if this transport is a source.
|
| bool | isDestination () const noexcept |
| | Returns true if this transport is a destination.
|
| Endpoint const & | endpoint () const noexcept |
| | Gets the endpoint descriptor associated with this transport.
|
| Channel * | channel () const noexcept |
| | Gets the channel which this transport is attached to if any.
|
| Port * | port () const noexcept |
| | Gets the port associated with this transport.
|
| NodePtr | node () const noexcept |
| | Gets the node associated with this transport.
|
| nlohmann::json const & | config () const noexcept |
| | Gets the JSON configuration used to initialize this transport.
|
Abstract base class for all source transports that inject messages into a Channel.
A SourceTransport represents the "Origin" side of a Channel. Its primary responsibility is to receive data-either from a local OutputPort or a remote network interface—and hand it off to the Channel for processing.
◆ SourceTransport()
| dfx::Core::SourceTransport::SourceTransport |
( |
Endpoint | endpoint, |
|
|
nlohmann::json | config ) |
|
inline |
Constructs a SourceTransport with the Role::Source role.
- Parameters
-
| endpoint | The originating endpoint descriptor. |
| config | Additional JSON configuration specific to this transport instance. |
◆ transmitMessage()
| bool dfx::Core::SourceTransport::transmitMessage |
( |
MessagePtr | message | ) |
|
|
protected |
Forwards a message to the attached Channel for orchestration.
This is the bridge between the transport layer and the channel logic. Derived classes call this method once they have a fully formed MessagePtr.
- Parameters
-
| message | The message to be processed by the graph. |
- Returns
true if the Channel accepted the message; false otherwise.
The documentation for this class was generated from the following file: