public interface ConnectionStatusListener
Modifier and Type | Method and Description |
---|---|
void |
updateNodeRole(java.lang.String newRole)
Informs any listeners that the client's redundancy node role has changed.
|
void |
updatePingTime(java.lang.String nodeRole,
java.lang.Double pingTime)
Informs listeners about how long the last successful ping operation took to run against the Gateway..
|
void |
updateStatus(GatewayInterface gateway,
java.lang.String nodeRole,
int connectionStatus,
java.lang.String projectState,
java.lang.String additionalInfo)
Expect this method to be called every few seconds by a timer in the AbstractGatewayConnection.
|
void updateStatus(GatewayInterface gateway, java.lang.String nodeRole, int connectionStatus, java.lang.String projectState, java.lang.String additionalInfo)
gateway
- the Gateway address of the connection as a GatewayInterfacenodeRole
- the redundant node role. May be "Master", "Backup", or "" for independent connections.connectionStatus
- one of the Status_* variables in AbstractGatewayConnection, representing the updated
connection status.projectState
- applies to redundant system and can be Unknown, Incompatible, OutOfDate, or Good as per
the ProjectState enum. Pass in null for unknown project state or non-redundant systems.additionalInfo
- any extra information that can be provided about the status. Connection events tend
to have extra info, particularly when Exceptions have been thrown.void updateNodeRole(java.lang.String newRole)
newRole
- Name of new rolevoid updatePingTime(java.lang.String nodeRole, java.lang.Double pingTime)
nodeRole
- the redundant node role. May be "Master", "Backup", or "" for independent connections.pingTime
- the number of milliseconds that it took to run the ping. Pass Double.NAN to indicate an error
occurred during the ping.