Apache Ignite C++
ignite_client_configuration.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
23 #ifndef _IGNITE_THIN_IGNITE_CLIENT_CONFIGURATION
24 #define _IGNITE_THIN_IGNITE_CLIENT_CONFIGURATION
25 
26 #include <string>
27 
28 #include <ignite/thin/ssl_mode.h>
29 
30 namespace ignite
31 {
32  namespace thin
33  {
40  {
41  public:
48  sslMode(SslMode::DISABLE)
49  {
50  // No-op.
51  }
52 
58  const std::string& GetEndPoints() const
59  {
60  return endPoints;
61  }
62 
73  void SetEndPoints(const std::string& endPoints)
74  {
75  this->endPoints = endPoints;
76  }
77 
83  const std::string& GetUser() const
84  {
85  return user;
86  }
87 
93  void SetUser(const std::string& user)
94  {
95  this->user = user;
96  }
97 
103  const std::string& GetPassword() const
104  {
105  return password;
106  }
107 
113  void SetPassword(const std::string& password)
114  {
115  this->password = password;
116  }
117 
126  {
127  return sslMode;
128  }
129 
137  void SetSslMode(SslMode::Type sslMode)
138  {
139  this->sslMode = sslMode;
140  }
141 
147  const std::string& GetSslCertFile() const
148  {
149  return sslCertFile;
150  }
151 
157  void SetSslCertFile(const std::string& sslCertFile)
158  {
159  this->sslCertFile = sslCertFile;
160  }
161 
167  const std::string& GetSslKeyFile() const
168  {
169  return sslKeyFile;
170  }
171 
177  void SetSslKeyFile(const std::string& sslKeyFile)
178  {
179  this->sslKeyFile = sslKeyFile;
180  }
181 
188  const std::string& GetSslCaFile() const
189  {
190  return sslCaFile;
191  }
192 
199  void SetSslCaFile(const std::string& sslCaFile)
200  {
201  this->sslCaFile = sslCaFile;
202  }
203 
204  private:
206  std::string endPoints;
207 
209  std::string user;
210 
212  std::string password;
213 
215  SslMode::Type sslMode;
216 
218  std::string sslCertFile;
219 
221  std::string sslKeyFile;
222 
224  std::string sslCaFile;
225  };
226  }
227 }
228 #endif // _IGNITE_THIN_IGNITE_CLIENT_CONFIGURATION
void SetSslCertFile(const std::string &sslCertFile)
Set file path to SSL certificate to use during connection establishment.
Definition: ignite_client_configuration.h:157
const std::string & GetSslCaFile() const
Get file path to SSL certificate authority to authenticate server certificate during connection estab...
Definition: ignite_client_configuration.h:188
const std::string & GetSslKeyFile() const
Get file path to SSL private key to use during connection establishment.
Definition: ignite_client_configuration.h:167
Declares ignite::thin::SslMode.
const std::string & GetSslCertFile() const
Get file path to SSL certificate to use during connection establishment.
Definition: ignite_client_configuration.h:147
void SetSslMode(SslMode::Type sslMode)
Set SSL mode.
Definition: ignite_client_configuration.h:137
IgniteClientConfiguration()
Default constructor.
Definition: ignite_client_configuration.h:47
void SetUser(const std::string &user)
Set user name to use for the authentication.
Definition: ignite_client_configuration.h:93
void SetSslKeyFile(const std::string &sslKeyFile)
Set file path to SSL private key to use during connection establishment.
Definition: ignite_client_configuration.h:177
SSL Mode.
Definition: ssl_mode.h:31
const std::string & GetPassword() const
Get password used for the authentication.
Definition: ignite_client_configuration.h:103
void SetSslCaFile(const std::string &sslCaFile)
Set file path to SSL certificate authority to authenticate server certificate during connection estab...
Definition: ignite_client_configuration.h:199
Ignite thin client configuration.
Definition: ignite_client_configuration.h:39
SslMode::Type GetSslMode() const
Get SSL mode.
Definition: ignite_client_configuration.h:125
Type
Definition: ssl_mode.h:33
void SetPassword(const std::string &password)
Set password to use for the authentication.
Definition: ignite_client_configuration.h:113
const std::string & GetEndPoints() const
Get server end points.
Definition: ignite_client_configuration.h:58
const std::string & GetUser() const
Get user name used for the authentication.
Definition: ignite_client_configuration.h:83
Apache Ignite API.
Definition: cache.h:48
void SetEndPoints(const std::string &endPoints)
Set addressess of the remote servers to connect.
Definition: ignite_client_configuration.h:73