AMPS C# Client  5.3.3.4
AMPS C# Client for .NET
AMPS.Client.DefaultServerChooser Class Reference
+ Inheritance diagram for AMPS.Client.DefaultServerChooser:

Public Member Functions

virtual DefaultServerChooser add (string uri)
 
virtual DefaultServerChooser addAll< T > (T uris)
 
virtual string getCurrentURI ()
 
virtual Authenticator getCurrentAuthenticator ()
 
virtual void reportFailure (Exception exception, ConnectionInfo ci)
 
virtual void reportSuccess (ConnectionInfo ci)
 
virtual void next ()
 
virtual String getError ()
 

Member Function Documentation

◆ add()

virtual DefaultServerChooser AMPS.Client.DefaultServerChooser.add ( string  uri)
inlinevirtual

Adds a URI to self.

Parameters
uriThe AMPS URI to add to the list.

◆ addAll< T >()

virtual DefaultServerChooser AMPS.Client.DefaultServerChooser.addAll< T > ( uris)
inlinevirtual

Adds URIs to self.

Parameters
urisThe AMPS URIs to add to the list.
Type Constraints
T :ICollection<String> 

◆ getCurrentAuthenticator()

virtual Authenticator AMPS.Client.DefaultServerChooser.getCurrentAuthenticator ( )
inlinevirtual

Returns the Authenticator instance associated with the current URI.

Returns
An Authenticator or
null
if none is required for logon.

Implements AMPS.Client.ServerChooser.

◆ getCurrentURI()

virtual string AMPS.Client.DefaultServerChooser.getCurrentURI ( )
inlinevirtual

Returns the current URI.

Returns
A string with the URI to connect to, or null if no server is available to connect to.

Implements AMPS.Client.ServerChooser.

◆ getError()

virtual String AMPS.Client.DefaultServerChooser.getError ( )
inlinevirtual

Provides additional detail to be included in an exception thrown when the AMPS instance(s) are not available. Called by the HAClient when creating an exception.

Returns
An String with information about the connection that failed and the reason for the failure. When no further information is available, returns an empty string.

Implements AMPS.Client.ServerChooser.

◆ reportFailure()

virtual void AMPS.Client.DefaultServerChooser.reportFailure ( Exception  exception,
ConnectionInfo  ci 
)
inlinevirtual

Called by the 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.

Parameters
exceptionThe exception associated with this failure.
uriThe uri that we attempted to connect with (but failed)
clientNameThe name of the client that is being reconnected.

Implements AMPS.Client.ServerChooser.

◆ reportSuccess()

virtual void AMPS.Client.DefaultServerChooser.reportSuccess ( ConnectionInfo  ci)
inlinevirtual

Called by the HAClient when successfully connected and logged on to the current instance.

Parameters
uriThe uri that we have successfully connected with.
clientNameThe name of the client that was successfully reconnected.

Implements AMPS.Client.ServerChooser.


The documentation for this class was generated from the following file: