xentara-plugin v1.2.1
The Xentara Plugin Framework
Loading...
Searching...
No Matches
xentara::process::MicroserviceClass Class Referenceabstract

A class of microservice that a service provider supports. More...

#include <process/MicroserviceClass.hpp>

Public Member Functions

virtual internal ~MicroserviceClass ()=0
 Virtual destructor.
 
virtual auto name () const -> std::string_view=0
 Gets the name of the microservice class.
 
virtual auto uuid () const -> utils::core::Uuid=0
 Gets the UUID of the microservice class.
 
auto nameHandle () const noexcept -> memory::Array::ObjectHandle< std::string >
 Gets an array handle to the name of a microservice.
 
auto primaryKeyHandle () const noexcept -> memory::Array::ObjectHandle< std::string >
 Gets an array handle to the primary key of a microservice.
 
auto uuidHandle () const noexcept -> memory::Array::ObjectHandle< utils::core::Uuid >
 Gets an array handle to the UUID of a microservice.
 

Protected Member Functions

auto config () -> memory::Array &
 Gets the array object used for the configuration attributes.
 

Detailed Description

A class of microservice that a service provider supports.

See also
xentara::process::Microservice
Microservice Classes

Constructor & Destructor Documentation

◆ ~MicroserviceClass()

xentara::process::MicroserviceClass::~MicroserviceClass ( )
pure virtualdefault

Virtual destructor.

Member Function Documentation

◆ config()

auto xentara::process::MicroserviceClass::config ( ) -> memory::Array &
protected

Gets the array object used for the configuration attributes.

This function returns the object that the framework will be using to allocate the memory block that contains the configuration attributes. You can call this function in the constructor to add confioguration attributes of your own.

You do not need to add the entire configuration of the microservices to this array, only the configuration parameters you intend to publish as Xentara attributes.

See also
Publishing Config Parameters as Xentara Attributes

◆ name()

virtual auto xentara::process::MicroserviceClass::name ( ) const -> std::string_view
pure virtual

Gets the name of the microservice class.

Returns
The name of the class, in UTF-8 encoding.

◆ nameHandle()

auto xentara::process::MicroserviceClass::nameHandle ( ) const -> memory::Array::ObjectHandle< std::string >
noexcept

Gets an array handle to the name of a microservice.

Note
Since the name of the microservice is part of its configuration, the returned handle should only be used once the microservice’s configuration has been fully loaded.
Returns
A handle to the microservice’s name in UTF-8 encoding.

◆ primaryKeyHandle()

auto xentara::process::MicroserviceClass::primaryKeyHandle ( ) const -> memory::Array::ObjectHandle< std::string >
noexcept

Gets an array handle to the primary key of a microservice.

Note
Since the primary key is only fully known once the configuration has been completely loaded, the returned handle should not be used to get the microservice’s key during loading. Specifically, the returned handle should not be used from within loadConfig().
Returns
A handle to the microservice’s primary key in UTF-8 encoding.

◆ uuid()

virtual auto xentara::process::MicroserviceClass::uuid ( ) const -> utils::core::Uuid
pure virtual

Gets the UUID of the microservice class.

◆ uuidHandle()

auto xentara::process::MicroserviceClass::uuidHandle ( ) const -> memory::Array::ObjectHandle< utils::core::Uuid >
noexcept

Gets an array handle to the UUID of a microservice.

Note
Since the UUID of the microservice is part of its configuration, this function should only be called once the microservice’s configuration has been fully loaded.