|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ServerChooser
Interface for choosing amongst multiple instances for both initial connection
and reconnection. Used by HAClient
to pick an initial server, and
then pick a new one on failure.
Method Summary | |
---|---|
Authenticator |
getCurrentAuthenticator()
Returns the Authenticator instance associated with the current URI. |
String |
getCurrentURI()
Returns the current URI. |
String |
getError()
Provides additional detail to be included in an exception thrown when the AMPS instance(s) are not available. |
void |
next()
Advances the server chooser to the next server it deems appropriate to connect with. |
void |
reportFailure(Exception exception,
ConnectionInfo info)
Called by the HAClient when an error occurs connecting to the
current URI, and/or when an error occurs logging on. |
void |
reportSuccess(ConnectionInfo info)
Called by the HAClient when successfully connected and logged on
to the current instance. |
Method Detail |
---|
String getCurrentURI()
Authenticator getCurrentAuthenticator() throws Exception
Authenticator
or null
if none is required for
logon.
Exception
void reportFailure(Exception exception, ConnectionInfo info)
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 this failure.info
- Information about the connection that failed.String getError()
HAClient
when creating an exception.
String
with information about the connection
that failed and the reason for the failure. When no
further information is available, returns an empty string.void reportSuccess(ConnectionInfo info)
HAClient
when successfully connected and logged on
to the current instance.
info
- Information about the successful connection.void next()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |