10Duke Enterprise C++ Client
|
#include <DefaultLicenseReleaseRequest.h>
Default implementation of tenduke::ee::licensing::LicenseReleaseRequest.
Public Member Functions | |
DefaultLicenseReleaseRequest (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::jwt::JWTParser > &jwtParser, const std::shared_ptr< const ::tenduke::ee::licensing::LicensingConfiguration > &configuration, ::tenduke::ee::licensing::LicenseReleaseParameters parameters) | |
Constructs new instance. | |
tenduke::ee::licensing::LicenseReleaseResponse | execute () override |
Execute the request synchronously. | |
Protected Member Functions | |
virtual tenduke::ee::licensing::LicenseReleaseResponse | parseResponsePayload (const std::string &payload) |
Parses response payload to tenduke::ee::licensing::LicenseReleaseResponse . | |
virtual void | parseSingleToken (const std::string &token, std::vector< std::string > &successfullyReleasedLeaseIds, std::map< std::string, tenduke::ee::licensing::LicensingError > &errors) |
Parses single token from the response, and places the token either to successfullyReleasedLeaseIds or errors depending on the contents of the token. | |
tenduke::ee::licensing::authzapi::DefaultLicenseReleaseRequest::DefaultLicenseReleaseRequest | ( | 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::jwt::JWTParser > & | jwtParser, | ||
const std::shared_ptr< const ::tenduke::ee::licensing::LicensingConfiguration > & | configuration, | ||
::tenduke::ee::licensing::LicenseReleaseParameters | parameters | ||
) |
Constructs new instance.
configuration | - |
parameters | - |
httpClient | - |
httpRequestAuthenticator | - |
jwtParser | - |
throwException | - |
|
overridevirtual |
Execute the request synchronously.
tenduke::http::HTTPException | e.g. internal server errors, invalid configuration (e.g. HTTP 404 not found) et al. |
tenduke::json::JSONParsingException | JSON has errors (should not usually happen) |
tenduke::ee::licensing::LicensingRequestFailure | e.g. invalid response (not JSON) |
tenduke::net::NetworkingException | e.g. timeouts, networking communication problems |
tenduke::TimedOut | generic time outs |
Implements tenduke::ee::licensing::authzapi::LicensingRequest< T >.
|
protectedvirtual |
Parses response payload to tenduke::ee::licensing::LicenseReleaseResponse
.
payload | the payload |
|
protectedvirtual |
Parses single token from the response, and places the token either to successfullyReleasedLeaseIds
or errors
depending on the contents of the token.
token | the token |
successfullyReleasedLeaseIds | lease-IDs successfully released |
errors | errors-map (key is lease-ID) |