seqeron 0.18.0
Loading...
Searching...
No Matches
org::limitless::seqeron::hosted::Application< Listener > Class Template Reference

The client stub of a hosted Application (doc/seqeron-protocol-spec.md §17): the surface of app::Application, with the façade itself running in a host process that this talks to over schema 218. More...

#include <org/limitless/seqeron/hosted/Application.hpp>

Inheritance diagram for org::limitless::seqeron::hosted::Application< Listener >:

Classes

struct  Config
 

Public Member Functions

 Application (Config config, Listener &listener)
 
bool canPublish () const noexcept
 What the last Gate said (H-16); lags the host by a hop.
 
bool isLeading () const noexcept
 
protocol::Publish publish (const std::uint16_t payloadId, const std::uint8_t *payload, const std::uint16_t payloadLength)
 Offers one payload of this application's own to its own group (H-4).
 
protocol::Publish publish (const std::uint16_t groupMask, const std::uint16_t payloadId, const std::uint8_t *payload, const std::uint16_t payloadLength)
 The same to the groups groupMask names as well as its own.
 
protocol::Publish reply (const app::ReplyAddress &request, const std::uint16_t payloadId, const std::uint8_t *payload, const std::uint16_t payloadLength)
 The same on behalf of the producer that asked for it (H-11): the reply carries the request's sourceId, connectionId and groupMask.
 

Detailed Description

template<typename Listener>
class org::limitless::seqeron::hosted::Application< Listener >

The client stub of a hosted Application (doc/seqeron-protocol-spec.md §17): the surface of app::Application, with the façade itself running in a host process that this talks to over schema 218.

Its listener is the direct Application's, and a Payload reaches it as it would there.

What differs: a Published command can be lost at a gate edge (H-3, H-4), the queries mirror the host's last Gate (H-16), and a snapshot cut is answered from the listener the Config names. The Gateway's is hosted::Gateway.

Single-threaded: every method belongs to the caller's one duty-cycle thread.

Constructor & Destructor Documentation

◆ Application()

template<typename Listener >
org::limitless::seqeron::hosted::Application< Listener >::Application ( Config  config,
Listener &  listener 
)
inline

Member Function Documentation

◆ canPublish()

template<typename Listener >
bool org::limitless::seqeron::hosted::Application< Listener >::canPublish ( ) const
inlinenoexcept

What the last Gate said (H-16); lags the host by a hop.

◆ isLeading()

template<typename Listener >
bool org::limitless::seqeron::hosted::Application< Listener >::isLeading ( ) const
inlinenoexcept

◆ publish() [1/2]

template<typename Listener >
protocol::Publish org::limitless::seqeron::hosted::Application< Listener >::publish ( const std::uint16_t  groupMask,
const std::uint16_t  payloadId,
const std::uint8_t *  payload,
const std::uint16_t  payloadLength 
)
inline

The same to the groups groupMask names as well as its own.

Parameters
groupMaskbits from the GroupDirectory; one the table lacks is Refused
payloadIdthe payload's protocol
payloadthe payload's first byte, its own messageHeader included if it has one
payloadLengththe payload's length

◆ publish() [2/2]

template<typename Listener >
protocol::Publish org::limitless::seqeron::hosted::Application< Listener >::publish ( const std::uint16_t  payloadId,
const std::uint8_t *  payload,
const std::uint16_t  payloadLength 
)
inline

Offers one payload of this application's own to its own group (H-4).

The result is an offer's, not the cluster's: Published means the host may place it. A gate edge in flight drops it, and the stub resends it when the gate reopens (H-17).

Returns
Published; Declined while the gate is shut, the window is full or stream 304 is back-pressured, to retry; Refused, permanently, for the local checks of a direct Application

◆ reply()

template<typename Listener >
protocol::Publish org::limitless::seqeron::hosted::Application< Listener >::reply ( const app::ReplyAddress &  request,
const std::uint16_t  payloadId,
const std::uint8_t *  payload,
const std::uint16_t  payloadLength 
)
inline

The same on behalf of the producer that asked for it (H-11): the reply carries the request's sourceId, connectionId and groupMask.

Parameters
requestthe request's ReplyAddress, kept from its Payload
payloadIdthe reply's protocol
payloadthe reply's first byte, its own messageHeader included if it has one
payloadLengththe reply's length

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