Interface PreKeyStore
-
- All Known Subinterfaces:
SignalProtocolStore
- All Known Implementing Classes:
InMemoryPreKeyStore,InMemorySignalProtocolStore
public interface PreKeyStoreAn interface describing the local storage ofPreKeyRecords.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontainsPreKey(int preKeyId)PreKeyRecordloadPreKey(int preKeyId)Load a local PreKeyRecord.voidremovePreKey(int preKeyId)Delete a PreKeyRecord from local storage.voidstorePreKey(int preKeyId, PreKeyRecord record)Store a local PreKeyRecord.
-
-
-
Method Detail
-
loadPreKey
PreKeyRecord loadPreKey(int preKeyId) throws InvalidKeyIdException
Load a local PreKeyRecord.- Parameters:
preKeyId- the ID of the local PreKeyRecord.- Returns:
- the corresponding PreKeyRecord.
- Throws:
InvalidKeyIdException- when there is no corresponding PreKeyRecord.
-
storePreKey
void storePreKey(int preKeyId, PreKeyRecord record)Store a local PreKeyRecord.- Parameters:
preKeyId- the ID of the PreKeyRecord to store.record- the PreKeyRecord.
-
containsPreKey
boolean containsPreKey(int preKeyId)
- Parameters:
preKeyId- A PreKeyRecord ID.- Returns:
- true if the store has a record for the preKeyId, otherwise false.
-
removePreKey
void removePreKey(int preKeyId)
Delete a PreKeyRecord from local storage.- Parameters:
preKeyId- The ID of the PreKeyRecord to remove.
-
-