AMPS C/C++ Client Class Reference
AMPS C/C++ Client Version 5.3.4.4
|
Abstract base class for choosing amongst multiple URIs for both the initial connection and reconnection. More...
#include <ServerChooserImpl.hpp>
Public Member Functions | |
virtual std::string | getCurrentURI ()=0 |
Returns the current URI. More... | |
virtual Authenticator & | getCurrentAuthenticator ()=0 |
Returns the Authenticator instance associated with the current URI. More... | |
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 logging on. More... | |
virtual std::string | getError () |
Called by HAClient when no servers are available to provide detailed error message in exception message. More... | |
virtual void | reportSuccess (const ConnectionInfo &info_)=0 |
Called by the HAClient when successfully connected and logged on to the current instance. More... | |
virtual void | add (const std::string &uri_)=0 |
Add a server to a server chooser if its policy permits. More... | |
virtual void | remove (const std::string &uri_)=0 |
Remove a server from a server chooser if its policy permits. More... | |
Abstract base class for choosing amongst multiple URIs for both the initial connection and reconnection.
Used by HAClient to pick an initial server and also to pick a server if there is a failure.
|
pure virtual |
Add a server to a server chooser if its policy permits.
uri_ | The URI of the server to add |
Implemented in AMPS::DefaultServerChooser.
|
pure virtual |
Returns the Authenticator instance associated with the current URI.
Implemented in AMPS::DefaultServerChooser.
|
pure virtual |
Returns the current URI.
Implemented in AMPS::DefaultServerChooser.
|
inlinevirtual |
Called by HAClient when no servers are available to provide detailed error message in exception message.
Reimplemented in AMPS::DefaultServerChooser.
|
pure virtual |
Remove a server from a server chooser if its policy permits.
uri_ | The URI of the server to remove |
Implemented in AMPS::DefaultServerChooser.
|
pure virtual |
Called by HAClient when an error occurs connecting to the current URI, and/or when an error occurs logging on.
Implementors will likely advance the current URI to the next one in a list, or choose to stay with the current one, based on the exception type.
exception_ | The exception associated with the failure. |
info_ | The information about the connection that failed. |
Implemented in AMPS::DefaultServerChooser.
|
pure virtual |
Called by the HAClient when successfully connected and logged on to the current instance.
info_ | The information about the connection that failed. |
Implemented in AMPS::DefaultServerChooser.