xentara-plugin v1.2.1
The Xentara Plugin Framework
|
#include <process/ServiceProvider.hpp>
Public Member Functions | |
virtual | ~Environment ()=0 |
Virtual destructor. | |
virtual auto | createMicroservice (const MicroserviceClass µserviceClass, plugin::SharedFactory< Microservice > &factory) -> std::shared_ptr< Microservice >=0 |
Called by the framework to create a new microservice. | |
Public Member Functions inherited from xentara::utils::tools::DisableCopy | |
constexpr | DisableCopy () noexcept=default |
DisableCopy (const DisableCopy &)=delete | |
DisableCopy & | operator= (const DisableCopy &)=delete |
|
pure virtualdefault |
Virtual destructor.
|
pure virtual |
Called by the framework to create a new microservice.
The implementation for this method must use the given factory to create a new microservice of the given microservice class:
If your service provider requires access to the microservice later, you must store an std::weak_ptr to it somewhere.
The framework will call loadConfig() on the newly created microservice.
microserviceClass | The class for the new microservice |
factory | The factory that must be used to create the microservice |
std::runtime_error | The function must throw this exception (or a suitable subclass) if an error occurs |