OnixS C++ ICE Binary Order Entry Handler 1.1.1
API Documentation
Loading...
Searching...
No Matches
BgwCredentialsProvider.h
Go to the documentation of this file.
1/*
2 * Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3 *
4 * This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5 * and international copyright treaties.
6 *
7 * Access to and use of the software is governed by the terms of the applicable OnixS Software
8 * Services Agreement (the Agreement) and Customer end user license agreements granting
9 * a non-assignable, non-transferable and non-exclusive license to use the software
10 * for it's own data processing purposes under the terms defined in the Agreement.
11 *
12 * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13 * of this source code or associated reference material to any other location for further reproduction
14 * or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15 *
16 * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17 * the terms of the Agreement is a violation of copyright law.
18 */
19
20#pragma once
21
25
27
30{
31public:
33 BgwCredentials() = default;
34
36 BgwCredentials(std::string host, unsigned short port, std::string ipSessionToken)
37 : Scheduling::Counterparty(std::move(host), port, std::move(ipSessionToken))
38 {
39 }
40
42 bool valid() const noexcept
43 {
44 return !host().empty() && !ipSessionToken().empty() && port() != 0;
45 }
46
48 explicit operator bool() const noexcept
49 {
50 return valid();
51 }
52};
53
56{
64 virtual Threading::SharedFuture<BgwCredentials> getBgwCredentialsAsync(const std::string& userId, bool forceRequest) = 0;
65
67 virtual ~IBgwCredentialsProvider() = default;
68};
69
#define ONIXS_ICEBOE_NAMESPACE_BEGIN
Definition ABI.h:94
#define ONIXS_ICEBOE_NAMESPACE_END
Definition ABI.h:98
bool valid() const noexcept
Checks whether all required fields are present and usable.
BgwCredentials(std::string host, unsigned short port, std::string ipSessionToken)
Fully identified credentials.
BgwCredentials()=default
Initializes a blank instance.
Parameters required to establish the connection with the counterparty.
const std::string & ipSessionToken() const noexcept
Counterparty()=default
Initializes a blank instance.
const std::string & host() const noexcept
Represents a future result of an asynchronous operation - a result that will eventually appear in the...
Definition Future.h:175
Interface to provide BGW session connection credentials.
virtual ~IBgwCredentialsProvider()=default
Virtual default destructor for IBgwCredentialsProvider.
virtual Threading::SharedFuture< BgwCredentials > getBgwCredentialsAsync(const std::string &userId, bool forceRequest)=0
Asynchronously provides the BGW session connection credentials for the given user id.