26 #ifndef _SERVERCHOOSER_H_ 27 #define _SERVERCHOOSER_H_ 30 #include <amps/ServerChooserImpl.hpp> 48 RefHandle<ServerChooserImpl> _body;
56 return _body.isValid();
66 return _body.get().getCurrentURI();
76 return _body.get().getCurrentAuthenticator();
87 const ConnectionInfo& info_)
89 _body.get().reportFailure(exception_, info_);
101 return _body.get().getError();
110 _body.get().reportSuccess(info_);
118 _body.get().
add(uri_);
125 void remove(
const std::string& uri_)
144 #endif //_SERVERCHOOSER_H_ void reportFailure(const AMPSException &exception_, const ConnectionInfo &info_)
Called by HAClient when an error occurs connecting to the current URI, and/or when an error occurs lo...
Definition: ServerChooser.hpp:86
Abstract base class for choosing amongst multiple URIs for both the initial connection and reconnecti...
Definition: ServerChooserImpl.hpp:39
std::string getError()
Provides additional detail to be included in an exception thrown when the AMPS instance(s) are not av...
Definition: ServerChooser.hpp:99
Authenticator & getCurrentAuthenticator()
Returns the Authenticator instance associated with the current URI.
Definition: ServerChooser.hpp:74
ServerChooser & add(const std::string &uri_)
Add a server to a server chooser if its policy permits.
Definition: ServerChooser.hpp:116
Core type, function, and class declarations for the AMPS C++ client.
void reportSuccess(const ConnectionInfo &info_)
Called by the HAClient when successfully connected and logged on to the current instance.
Definition: ServerChooser.hpp:108
std::string getCurrentURI()
Returns the current URI.
Definition: ServerChooser.hpp:64
Abstract base class for choosing amongst multiple URIs for both the initial connection and reconnecti...
Definition: ServerChooser.hpp:46
void remove(const std::string &uri_)
Remove a server from a server chooser if its policy permits.
Definition: ServerChooser.hpp:125
Definition: ampsplusplus.hpp:106
The interface for handling authentication with the AMPS server.
Definition: ampsplusplus.hpp:968