public class KontaktDeviceServiceStore extends java.lang.Object implements GattServiceStore
Modifier and Type | Class and Description |
---|---|
static class |
KontaktDeviceServiceStore.StoreType
Type of store
KontaktDeviceServiceStore.StoreType.NORMAL if beacon firmware revision is lower than 4.0
KontaktDeviceServiceStore.StoreType.SECURE if beacon firmware revision is 4.0 and greater
|
Constructor and Description |
---|
KontaktDeviceServiceStore(java.util.List<BluetoothGattService> gattServices,
KontaktDeviceServiceStore.StoreType storeType)
Instantiates a new Service store.
|
public KontaktDeviceServiceStore(java.util.List<BluetoothGattService> gattServices, KontaktDeviceServiceStore.StoreType storeType) throws RemoteException
gattServices
- beacon services listRemoteException
- the remote exception thrown if services list does
not match the specification of kontakt.io beaconpublic BluetoothDeviceCharacteristic getFirmwareRevisionCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getFirmwareRevisionCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getHardwareRevisionCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getHardwareRevisionCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getManufacturerNameCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getManufacturerNameCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getDeviceNameCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getDeviceNameCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getPropagatedDeviceNameCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getPropagatedDeviceNameCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getMinorCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getMinorCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getNonConnectableCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getNonConnectableCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getShuffleIntervalCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getShuffleIntervalCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getShuffleKeyCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getShuffleKeyCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getSensorOnCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getSensorOnCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getAccelerometerCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getAccelerometerCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getActiveProfileCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getActiveProfileCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getMajorCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getMajorCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getProximityCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getProximityCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getPowerLevelCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getPowerLevelCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getBatteryLevelCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getBatteryLevelCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getPasswordCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getPasswordCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getMasterPasswordCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getMasterPasswordCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getSetNewPasswordCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getSetNewPasswordCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getAdvertisingIntervalCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getAdvertisingIntervalCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getResetCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getResetCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getBootloaderCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getBootloaderCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getUniqueIdCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getUniqueIdCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getNamespaceIdCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getNamespaceIdCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getInstanceIdCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getInstanceIdCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getUrlCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getUrlCharacteristic
in interface GattServiceStore
ServiceAbsentException
CharacteristicAbsentException
public BluetoothDeviceCharacteristic getDefaultSettingsCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
getDefaultSettingsCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getSecureLastProcessedRequestTokenCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
Characteristic added in firmware revision 4.0, on lower firmware revision throws exception
getSecureLastProcessedRequestTokenCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getSecureWriteCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
Characteristic added in firmware revision 4.0, on lower firmware revision throws exception
getSecureWriteCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getSecureResponseCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
Characteristic added in firmware revision 4.0, on lower firmware revision throws exception
getSecureResponseCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic BluetoothDeviceCharacteristic getSecureControlPointCharacteristic() throws ServiceAbsentException, CharacteristicAbsentException
Characteristic added in firmware revision 4.0, on lower firmware revision throws exception
getSecureControlPointCharacteristic
in interface GattServiceStore
BluetoothDeviceCharacteristic
characteristic wrapperServiceAbsentException
- if service not foundCharacteristicAbsentException
- if characteristic not foundpublic KontaktDeviceServiceStore.StoreType getStoreType()
KontaktDeviceServiceStore.StoreType
public boolean contains(KontaktDeviceService serviceModel)
KontaktDeviceService
was found during service discoverycontains
in interface GattServiceStore
serviceModel
- model to findpublic void replace(BluetoothDeviceCharacteristic characteristicWrapper) throws ServiceAbsentException
replace
in interface GattServiceStore
characteristicWrapper
- new characteristicServiceAbsentException
- if service not foundpublic void clear()
clear
in interface GattServiceStore
public final java.util.Collection<BluetoothDeviceCharacteristic> getReadableCharacteristics()