AMPS C/C++ Client Class Reference
AMPS C/C++ Client Version 5.3.4.3
ServerChooserImpl.hpp
1 //
3 // Copyright (c) 2010-2024 60East Technologies Inc., All Rights Reserved.
4 //
5 // This computer software is owned by 60East Technologies Inc. and is
6 // protected by U.S. copyright laws and other laws and by international
7 // treaties. This computer software is furnished by 60East Technologies
8 // Inc. pursuant to a written license agreement and may be used, copied,
9 // transmitted, and stored only in accordance with the terms of such
10 // license agreement and with the inclusion of the above copyright notice.
11 // This computer software or any other copies thereof may not be provided
12 // or otherwise made available to any other person.
13 //
14 // U.S. Government Restricted Rights. This computer software: (a) was
15 // developed at private expense and is in all respects the proprietary
16 // information of 60East Technologies Inc.; (b) was not developed with
17 // government funds; (c) is a trade secret of 60East Technologies Inc.
18 // for all purposes of the Freedom of Information Act; and (d) is a
19 // commercial item and thus, pursuant to Section 12.212 of the Federal
20 // Acquisition Regulations (FAR) and DFAR Supplement Section 227.7202,
21 // Government's use, duplication or disclosure of the computer software
22 // is subject to the restrictions set forth by 60East Technologies Inc..
23 //
25 
26 #ifndef _SERVERCHOOSERIMPL_H_
27 #define _SERVERCHOOSERIMPL_H_
28 
29 #include <amps/ampsplusplus.hpp>
30 
31 namespace AMPS
32 {
33 
39  class ServerChooserImpl : public RefBody
40  {
41  public:
46  virtual std::string getCurrentURI() = 0;
47 
53 
61  virtual void reportFailure(const AMPSException& exception_,
62  const ConnectionInfo& info_) = 0;
63 
68  virtual std::string getError()
69  {
70  return std::string();
71  }
72 
77  virtual void reportSuccess(const ConnectionInfo& info_) = 0;
78 
82  virtual void add(const std::string& uri_) = 0;
83 
87  virtual void remove(const std::string& uri_) = 0;
88 
89  virtual ~ServerChooserImpl() {}
90  };
91 
92 } //namespace AMPS
93 
94 #endif //_SERVERCHOOSERIMPL_H_
95 
virtual std::string getError()
Called by HAClient when no servers are available to provide detailed error message in exception messa...
Definition: ServerChooserImpl.hpp:68
virtual std::string getCurrentURI()=0
Returns the current URI.
Abstract base class for choosing amongst multiple URIs for both the initial connection and reconnecti...
Definition: ServerChooserImpl.hpp:39
virtual Authenticator & getCurrentAuthenticator()=0
Returns the Authenticator instance associated with the current URI.
virtual void reportSuccess(const ConnectionInfo &info_)=0
Called by the HAClient when successfully connected and logged on to the current instance.
Core type, function, and class declarations for the AMPS C++ client.
virtual void add(const std::string &uri_)=0
Add a server to a server chooser if its policy permits.
Definition: ampsplusplus.hpp:102
The interface for handling authentication with the AMPS server.
Definition: ampsplusplus.hpp:995
virtual void reportFailure(const AMPSException &exception_, const ConnectionInfo &info_)=0
Called by HAClient when an error occurs connecting to the current URI, and/or when an error occurs lo...