Class ServiceInfo

Class Documentation

class ServiceInfo

Service info container.

Contains metadata about a received service request or response.

Public Functions

ServiceInfo(const Timestamp &source_timestamp, const Timestamp &received_timestamp, const Gid &client_gid, const SequenceNumber sequence_number)

Constructor.

ServiceInfo(const ServiceInfo&) = default
~ServiceInfo()
const Timestamp &source_timestamp() const

Get the request or response source timestamp.

const Timestamp &received_timestamp() const

Get the request or response reception timestamp.

const Gid &client_gid() const

Get the service client GID.

SequenceNumber sequence_number() const

Get the request sequence number.

Public Static Functions

static std::optional<ServiceInfo> from_headers(const EmailHeaders &headers)

Get a ServiceInfo object from email headers.

The received timestamp will be created using Timestamp::now().

Parameters:

headers – the email headers

Returns:

the service info object, or std::nullopt if the email headers don’t contain the expected info

Public Static Attributes

static constexpr auto HEADER_CLIENT_GID = "Client-GID"

Custom header name for service client GID.