public static interface BeaconDetector.BeaconListener
Listener that is notified of received beacons. This information can be
interesting for a component that keeps a connection to this server
because received beacons can be used as a health indicator. For example,
a regular beacon typically indicates that the connection to the server is
in order. An irregular beacon on the other hand might indicate that the
connection to the server is unreliable (e.g. it might have been
interrupted for a certain period or the server might have been restarted)
and thus it should be checked whether the connection still works or needs
to be reestablished.
Called when a beacon is received. If the beacon detector determines
that the received beacon is most likely a duplicate of a beacon that
has been received earlier, this method is not called. Typically, this
method will be called from the communication thread of the beacon
detector. Therefore, this method should not perform operations that
take a considerable amount of time or might block.
serverAddress - IP address and port number of the server that sent the
beacon message (never null). This can be used
to detect which server triggered the anomaly when the same
listener is registered for multiple addresses.
regularBeacon - true if this beacon was expected and arrived
at the expected point in time. false if the
beacon was unexpected (e.g. because it was the first
beacon or because it was significantly delayed or early).
If false, a component maintaining a
connection to the server might want to verify that the
connection is still working.