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

A Xentara service provider. More...

#include <process/ServiceProvider.hpp>

+ Inheritance diagram for xentara::process::ServiceProvider:

Classes

class  Environment
 
class  Registry
 

Public Member Functions

virtual ~ServiceProvider ()=0
 Virtual destructor.
 
virtual auto name () const -> std::string_view=0
 Gets the name of the service provider.
 
virtual auto uuid () const -> utils::core::Uuid=0
 Gets the UUID of the service provider.
 
virtual auto registerObjects (Registry &registry) -> void=0
 Called by the framework to regiter all service provider objects.
 
virtual auto createEnvironment () -> std::unique_ptr< Environment >=0
 Called by the framework to create the runtime environment for the service provider.
 
- Public Member Functions inherited from xentara::utils::tools::DisableCopy
constexpr DisableCopy () noexcept=default
 
 DisableCopy (const DisableCopy &)=delete
 
DisableCopyoperator= (const DisableCopy &)=delete
 

Detailed Description

A Xentara service provider.

Service providers implement Xentara microservices

See also
Writing Service Providers
Service Providers in the Xentara user manual

Constructor & Destructor Documentation

◆ ~ServiceProvider()

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

Virtual destructor.

Member Function Documentation

◆ createEnvironment()

virtual auto xentara::process::ServiceProvider::createEnvironment ( ) -> std::unique_ptr< Environment >
pure virtual

Called by the framework to create the runtime environment for the service provider.

The implementation for this method must create the run time environment for the service provider.

Returns
The newly created environment. Must never return nullptr.
Exceptions
std::runtime_exception

◆ name()

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

Gets the name of the service provider.

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

◆ registerObjects()

virtual auto xentara::process::ServiceProvider::registerObjects ( Registry registry) -> void
pure virtual

Called by the framework to regiter all service provider objects.

The service provider must register all microservice classes it provides.

Parameters
registryThe registry that should be used to register the classes

◆ uuid()

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

Gets the UUID of the service provider.