public interface BeaconDetector
Detector for beacons sent by Channel Access servers. The beacon detector listens for beacons sent by Channel Access servers and tries to detect anomalies in the receive pattern. If it detects an anomaly, it notifies the corresponding listeners which have been registered with the beacon detector.
An implementation of this interface should ensure that the methods defined by this interface are thread safe and thus can be called by any thread.
An implementation of this interface may decide to process add and remove requests for listeners asynchronously. This means, that a listener that has just been added might not receive notifications immediately and that a listener that has just been removed might still receive notifications for a while.
The beacon detector may keep references to the listeners registered with it in the form of strong or weak references. This means that code registering a listener should always remove the listener explicitly if it is not needed any longer, but should still keep a strong reference to it as long as it wants to keep the listener alive.
Modifier and Type | Interface and Description |
---|---|
static interface |
BeaconDetector.BeaconAnomalyListener
Listener for a beacon anomaly.
|
static interface |
BeaconDetector.BeaconListener
Listener that is notified of received beacons.
|
Modifier and Type | Method and Description |
---|---|
void |
addBeaconAnomalyListener(BeaconDetector.BeaconAnomalyListener listener)
Adds beacon anomaly listener.
|
void |
addBeaconListener(java.net.InetSocketAddress serverAddress,
BeaconDetector.BeaconListener listener)
Adds a beacon listener.
|
void |
removeBeaconAnomalyListener(BeaconDetector.BeaconAnomalyListener listener)
Removes a beacon anomaly listener.
|
void |
removeBeaconListener(java.net.InetSocketAddress serverAddress,
BeaconDetector.BeaconListener listener)
Removes a beacon listener.
|
void addBeaconAnomalyListener(BeaconDetector.BeaconAnomalyListener listener)
listener
- beacon anomaly listener (never null
).void removeBeaconAnomalyListener(BeaconDetector.BeaconAnomalyListener listener)
listener
- beacon anomaly listener that shall be removed (never
null
).void addBeaconListener(java.net.InetSocketAddress serverAddress, BeaconDetector.BeaconListener listener)
serverAddress
- IP address and port number of the server the listener is
registered for (never null
).listener
- beacon listener (never null
).void removeBeaconListener(java.net.InetSocketAddress serverAddress, BeaconDetector.BeaconListener listener)
serverAddress
- IP address and port number of the server the listener was
originally registered for (never null
).listener
- beacon listener that shall be removed (never null
).Copyright © 2014–2017 aquenos GmbH. All rights reserved.