|
AMPS C/C++ Client Class Reference
AMPS C/C++ Client Version 5.3.5.0
|
A server chooser that rotates through multiple URIs, in order. More...
#include <DefaultServerChooser.hpp>
Inheritance diagram for AMPS::DefaultServerChooser:Public Member Functions | |
| DefaultServerChooser () | |
| Default constructor which initializes an empty DefaultServerChooser. | |
| virtual std::string | getCurrentURI () |
| Returns the current URI. More... | |
| void | add (const std::string &uri_) |
| Adds the given URI to self's list of URIs. More... | |
| template<class T > | |
| void | addAll (const T &uriContainer_) |
| Adds the given URIs to self's list of URIs. More... | |
| void | remove (const std::string &) |
| Removes the given URI from self's list of URIs if found. More... | |
| virtual Authenticator & | getCurrentAuthenticator () |
| Returns the Authenticator instance associated with the current URI. More... | |
| virtual void | reportFailure (const AMPSException &exception_, const ConnectionInfo &) |
| Called by HAClient when an error occurs connecting to the current URI, and/or when an error occurs logging on. More... | |
| virtual std::string | getError () |
| Called by HAClient when no servers are available to provide a more detailed error message in the exception message. More... | |
| virtual void | reportSuccess (const ConnectionInfo &) |
| Called by the HAClient when successfully connected and logged on to the current instance. More... | |
| virtual void | next () |
| Advance the server chooser to the next server in the list, starting over with the first server when the chooser reaches the end of the list. More... | |
| ~DefaultServerChooser () | |
| Destroy self. | |
A server chooser that rotates through multiple URIs, in order.
Used by HAClient to pick an initial server and also to pick a server if there is a failure.
|
inlinevirtual |
Adds the given URI to self's list of URIs.
| uri_ | The URI to add to self. |
Implements AMPS::ServerChooserImpl.
|
inline |
Adds the given URIs to self's list of URIs.
| uriContainer_ | The URIs to add to self. |
|
inlinevirtual |
Returns the Authenticator instance associated with the current URI.
Implements AMPS::ServerChooserImpl.
|
inlinevirtual |
Returns the current URI.
Implements AMPS::ServerChooserImpl.
|
inlinevirtual |
Called by HAClient when no servers are available to provide a more detailed error message in the exception message.
This implementation returns an empty string.
Reimplemented from AMPS::ServerChooserImpl.
|
inlinevirtual |
Advance the server chooser to the next server in the list, starting over with the first server when the chooser reaches the end of the list.
|
inlinevirtual |
Removes the given URI from self's list of URIs if found.
For DefaultServerChooser, this method has no effect.
Implements AMPS::ServerChooserImpl.
|
inlinevirtual |
Called by HAClient when an error occurs connecting to the current URI, and/or when an error occurs logging on.
Advance the current URI to the next one in a list
| exception_ | The exception associated with the failure. |
Implements AMPS::ServerChooserImpl.
|
inlinevirtual |
Called by the HAClient when successfully connected and logged on to the current instance.
This implementation does nothing.
Implements AMPS::ServerChooserImpl.