PLCnext API Documentation 25.0.2.69
IRscServiceFactory.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
8#include "Arp/Base/Rsc/Commons/Rsc.hpp"
9#include "Arp/Base/Rsc/Commons/IRscService.hpp"
10#include "Arp/Base/Rsc/Commons/Services/IRscServiceStub.hpp"
11
12namespace Arp::Base::Rsc::Commons::Services
13{
14
15// forwards
17
25class ARP_EXPORT IRscServiceFactory
26{
27public: // usings
29 using Ptr = std::shared_ptr<IRscServiceFactory>;
30
31public: // construction
33 IRscServiceFactory(void) = default;
34
35public: // canonical construction/destruction/assignment
40 IRscServiceFactory(IRscServiceFactory&& arg)noexcept = default;
48 virtual ~IRscServiceFactory(void) = default;
49
50public: // abstract properties
53 virtual bool IsSecure(void)const = 0;
54
57 virtual String GetServiceProviderName(void)const = 0;
58
59public: // abstract operations
64 virtual IRscService::Ptr CreateServiceImpl(const char* providerName, IRscAuthorizator* pAuthorizator) = 0;
65
73 virtual IRscServiceStub::Ptr CreateServiceStub(SerializationKind kind, IRscService::Ptr pService) = 0;
74};
75
76} // end of namespace Arp::Base::Rsc::Commons::Services
This class represents the Arp String. The implementation is based on std::string.
Definition: String.hpp:39
std::shared_ptr< IRscService > Ptr
The shared_ptr type of IRscService.
Definition: IRscService.hpp:25
This interface is used to authorize a Rsc service call.
Definition: IRscAuthorizator.hpp:21
Interface for service factory classes to create instances of the service implementation,...
Definition: IRscServiceFactory.hpp:26
virtual IRscServiceStub::Ptr CreateServiceStub(SerializationKind kind, IRscService::Ptr pService)=0
This operation creates a service stub of various serialization kinds, e.g. SerializationKind::Rsc or ...
std::shared_ptr< IRscServiceFactory > Ptr
The shared_tr type of this type.
Definition: IRscServiceFactory.hpp:29
IRscServiceFactory(const IRscServiceFactory &arg)=delete
The deleted copy constructor.
virtual String GetServiceProviderName(void) const =0
Gets the service-provider name of the services created by this factory.
virtual IRscService::Ptr CreateServiceImpl(const char *providerName, IRscAuthorizator *pAuthorizator)=0
Creates a service implementation instance.
IRscServiceFactory(void)=default
The default constructor.
virtual bool IsSecure(void) const =0
Determines if the services of this factory shall be authorized by security.
IRscServiceFactory(IRscServiceFactory &&arg) noexcept=default
The default move constructor.
virtual ~IRscServiceFactory(void)=default
Destructs this instance and frees all resources.
IRscServiceFactory & operator=(const IRscServiceFactory &)=delete
The deleted assignment operator.
IRscServiceFactory & operator=(IRscServiceFactory &&arg) noexcept=default
The default move-assignment operator.
std::shared_ptr< IRscServiceStub > Ptr
The shared pointer type of this type.
Definition: IRscServiceStub.hpp:21