26 #ifndef _SERVERCHOOSER_H_ 27 #define _SERVERCHOOSER_H_ 30 #include <amps/ServerChooserImpl.hpp> 48 RefHandle<ServerChooserImpl> _body;
58 return _body.isValid();
68 return _body.get().getCurrentURI();
78 return _body.get().getCurrentAuthenticator();
89 const ConnectionInfo& info_)
91 _body.get().reportFailure(exception_, info_);
103 return _body.get().getError();
112 _body.get().reportSuccess(info_);
120 _body.get().
add(uri_);
127 void remove(
const std::string& uri_)
135 #if defined(__GXX_EXPERIMENTAL_CXX0X__) || _MSC_VER >= 1600 145 #endif // defined(__GXX_EXPERIMENTAL_CXX0X__) || _MSC_VER >= 1600 155 #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:88
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:101
Authenticator & getCurrentAuthenticator()
Returns the Authenticator instance associated with the current URI.
Definition: ServerChooser.hpp:76
ServerChooser & add(const std::string &uri_)
Add a server to a server chooser if its policy permits.
Definition: ServerChooser.hpp:118
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:110
std::string getCurrentURI()
Returns the current URI.
Definition: ServerChooser.hpp:66
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:127
Definition: ampsplusplus.hpp:102
The interface for handling authentication with the AMPS server.
Definition: ampsplusplus.hpp:995