public class BlaubotBeaconStore extends java.lang.Object implements IBlaubotBeaconStore, IBlaubotDiscoveryEventListener
Constructor and Description |
---|
BlaubotBeaconStore() |
Modifier and Type | Method and Description |
---|---|
AbstractBlaubotDeviceDiscoveryEvent |
getLastDiscoveryEvent(java.lang.String uniqueDeviceID)
Get the last received discovery event for a given uniqueDeviceId
|
java.util.List<ConnectionMetaDataDTO> |
getLastKnownConnectionMetaData(java.lang.String uniqueDeviceId)
Get the last known connection meta data for a device
|
State |
getLastKnownState(java.lang.String uniqueDeviceId)
Retrieve the last known state for a device
|
void |
onDeviceDiscoveryEvent(AbstractBlaubotDeviceDiscoveryEvent discoveryEvent)
Gets called when a IBlaubotBeaconInterface implementation recognized another blaubot device.
|
void |
putConnectionMetaData(java.lang.String uniqueDeviceId,
ConnectionMetaDataDTO connectionMetaData) |
void |
putConnectionMetaData(java.lang.String uniqueDeviceId,
java.util.List<ConnectionMetaDataDTO> connectionMetaDataList)
Puts connection meta data received from anywhere to the store (mostly used in acceptors and the
AdminMessageBeacon)
|
void |
putDiscoveryEvent(BeaconMessage theirBeaconMessage,
IBlaubotDevice remoteDevice)
Adds a discovery event by beacon message to the store.
|
java.lang.String |
toString() |
public java.util.List<ConnectionMetaDataDTO> getLastKnownConnectionMetaData(java.lang.String uniqueDeviceId)
IBlaubotBeaconStore
getLastKnownConnectionMetaData
in interface IBlaubotBeaconStore
uniqueDeviceId
- the unique device id of the device for which the connection meta data should be retrievedpublic State getLastKnownState(java.lang.String uniqueDeviceId)
IBlaubotBeaconStore
getLastKnownState
in interface IBlaubotBeaconStore
uniqueDeviceId
- the device's unique idpublic AbstractBlaubotDeviceDiscoveryEvent getLastDiscoveryEvent(java.lang.String uniqueDeviceID)
IBlaubotBeaconStore
getLastDiscoveryEvent
in interface IBlaubotBeaconStore
uniqueDeviceID
- the device idpublic void putDiscoveryEvent(BeaconMessage theirBeaconMessage, IBlaubotDevice remoteDevice)
IBlaubotBeaconStore
putDiscoveryEvent
in interface IBlaubotBeaconStore
theirBeaconMessage
- the discovery event to addremoteDevice
- the remote device from which the message was receivedpublic void putConnectionMetaData(java.lang.String uniqueDeviceId, java.util.List<ConnectionMetaDataDTO> connectionMetaDataList)
IBlaubotBeaconStore
putConnectionMetaData
in interface IBlaubotBeaconStore
uniqueDeviceId
- the unique device idconnectionMetaDataList
- the device's connection meta datapublic void putConnectionMetaData(java.lang.String uniqueDeviceId, ConnectionMetaDataDTO connectionMetaData)
public void onDeviceDiscoveryEvent(AbstractBlaubotDeviceDiscoveryEvent discoveryEvent)
IBlaubotDiscoveryEventListener
onDeviceDiscoveryEvent
in interface IBlaubotDiscoveryEventListener
discoveryEvent
- the event holding all information gathered by the beaconpublic java.lang.String toString()
toString
in class java.lang.Object