1#ifndef TENDUKE_SE_LICENSING_REST_DEFAULTLICENSEHEARTBEATREQUEST_H
2#define TENDUKE_SE_LICENSING_REST_DEFAULTLICENSEHEARTBEATREQUEST_H
4#include "./AbstractLicenseRequest.h"
5#include "./LicenseHeartbeatRequest.h"
6#include "../../api/licenses/JWTToLease.h"
7#include "../../api/licenses/heartbeat/LicenseHeartbeatParameters.h"
8#include "../../api/licenses/heartbeat/LicenseHeartbeatResponse.h"
9#include "../../../rest/RESTConfiguration.h"
10#include "../../../config/ClientProperties.h"
11#include "http/HTTPClient.h"
12#include "http/HTTPRequestAuthenticator.h"
13#include "http/HTTPResponseToException.h"
14#include "json/JSONParser.h"
15#include "jwt/JWTParser.h"
45 const std::shared_ptr<const ::tenduke::se::ClientProperties> &
clientProperties,
46 const std::shared_ptr<const ::tenduke::se::rest::RESTConfiguration> &
configuration,
47 const std::shared_ptr<const ::tenduke::http::HTTPClient> &httpClient,
49 const std::shared_ptr<const ::tenduke::http::HTTPResponseToException> &
throwException,
50 const std::shared_ptr<const ::tenduke::json::JSONParser> &jsonParser,
51 const std::shared_ptr<const ::tenduke::jwt::JWTParser> &jwtParser,
52 const std::shared_ptr<const ::tenduke::se::licensing::JWTToLease> &jwtToLease,
70 const ::tenduke::se::licensing::LicenseHeartbeatParameters parameters;
72 const std::shared_ptr<const ::tenduke::se::licensing::JWTToLease> createLease;
73 const std::shared_ptr<const ::tenduke::jwt::JWTParser> parseJWT;
DefaultLicenseHeartbeatRequest(::tenduke::se::licensing::LicenseHeartbeatParameters parameters, const std::shared_ptr< const ::tenduke::se::ClientProperties > &clientProperties, const std::shared_ptr< const ::tenduke::se::rest::RESTConfiguration > &configuration, const std::shared_ptr< const ::tenduke::http::HTTPClient > &httpClient, const std::shared_ptr< const ::tenduke::http::HTTPRequestAuthenticator > &httpRequestAuthenticator, const std::shared_ptr< const ::tenduke::http::HTTPResponseToException > &throwException, const std::shared_ptr< const ::tenduke::json::JSONParser > &jsonParser, const std::shared_ptr< const ::tenduke::jwt::JWTParser > &jwtParser, const std::shared_ptr< const ::tenduke::se::licensing::JWTToLease > &jwtToLease, const std::string &licenseKey=::tenduke::se::licensing::rest::AbstractLicenseRequest::NO_LICENSE_KEY, bool metered=::tenduke::se::licensing::rest::AbstractLicenseRequest::NON_METERED)
Constructs new instance.
Definition DefaultLicenseHeartbeatRequest.cpp:118
Parameters for license heartbeat request.
Definition LicenseHeartbeatParameters.h:15
Response from license heartbeat call.
Definition LicenseHeartbeatResponse.h:19
Abstract base class for license-related requests.
Definition AbstractLicenseRequest.h:20
static const bool NON_METERED
Magic value to indicate that this is normal (not metered) license request.
Definition AbstractLicenseRequest.h:28
static const std::string NO_LICENSE_KEY
Magic value to indicate that this is not a license key request.
Definition AbstractLicenseRequest.h:23
const std::shared_ptr< const ::tenduke::http::HTTPRequestAuthenticator > httpRequestAuthenticator
HTTP-request authenticator.
Definition AbstractLicenseRequest.h:91
const std::shared_ptr< const ::tenduke::http::HTTPResponseToException > throwException
Throw-exception.
Definition AbstractLicenseRequest.h:93
const std::shared_ptr< const ::tenduke::se::ClientProperties > clientProperties
Client properties.
Definition AbstractLicenseRequest.h:83
const std::shared_ptr< const ::tenduke::se::rest::RESTConfiguration > configuration
Config.
Definition AbstractLicenseRequest.h:85
::tenduke::se::licensing::LicenseHeartbeatResponse fromJSON(const std::string &jsonDocument) const
Parses the response entity from JSON message body.
Definition DefaultLicenseHeartbeatRequest.cpp:44
DefaultLicenseHeartbeatRequest(::tenduke::se::licensing::LicenseHeartbeatParameters parameters, const std::shared_ptr< const ::tenduke::se::ClientProperties > &clientProperties, const std::shared_ptr< const ::tenduke::se::rest::RESTConfiguration > &configuration, const std::shared_ptr< const ::tenduke::http::HTTPClient > &httpClient, const std::shared_ptr< const ::tenduke::http::HTTPRequestAuthenticator > &httpRequestAuthenticator, const std::shared_ptr< const ::tenduke::http::HTTPResponseToException > &throwException, const std::shared_ptr< const ::tenduke::json::JSONParser > &jsonParser, const std::shared_ptr< const ::tenduke::jwt::JWTParser > &jwtParser, const std::shared_ptr< const ::tenduke::se::licensing::JWTToLease > &jwtToLease, const std::string &licenseKey=::tenduke::se::licensing::rest::AbstractLicenseRequest::NO_LICENSE_KEY, bool metered=::tenduke::se::licensing::rest::AbstractLicenseRequest::NON_METERED)
Constructs new instance.
Definition DefaultLicenseHeartbeatRequest.cpp:118
::tenduke::se::licensing::LicenseHeartbeatResponse execute() override
Execute the request synchronously.
Definition DefaultLicenseHeartbeatRequest.cpp:80
Low-level services for performing licensing REST-requests.
Definition DefaultDescribeLicenseConsumerClientBindingsRequest.h:9
::tenduke::se::APIRequest<::tenduke::se::licensing::LicenseHeartbeatResponse > LicenseHeartbeatRequest
License heartbeat request.
Definition LicenseHeartbeatRequest.h:12
Licensing operations for 10Duke Scale.
Definition LicenseConsumerClientBindingStatus.h:8
Classes, functions and globals of 10Duke Scale C++ Client.
Definition AbstractClientFactory.h:16
Root for classes, functions and globals of 10Duke C++ Client.
Definition AbstractClientFactory.h:16