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_);
129 _body.get().remove(uri_);
135 #if defined(__GXX_EXPERIMENTAL_CXX0X__) || _MSC_VER >= 1600
136 ServerChooser(ServerChooser&& rhs) : _body(rhs._body)
140 ServerChooser& operator=(ServerChooser&& rhs)
146 ServerChooser& operator=(
const ServerChooser& rhs)
Core type, function, and class declarations for the AMPS C++ client.
The interface for handling authentication with the AMPS server.
Definition: ampsplusplus.hpp:999
Abstract base class for choosing amongst multiple URIs for both the initial connection and reconnecti...
Definition: ServerChooserImpl.hpp:40
Abstract base class for choosing amongst multiple URIs for both the initial connection and reconnecti...
Definition: ServerChooser.hpp:47
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
ServerChooser & add(const std::string &uri_)
Add a server to a server chooser if its policy permits.
Definition: ServerChooser.hpp:118
Authenticator & getCurrentAuthenticator()
Returns the Authenticator instance associated with the current URI.
Definition: ServerChooser.hpp:76
void remove(const std::string &uri_)
Remove a server from a server chooser if its policy permits.
Definition: ServerChooser.hpp:127
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
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