Class InMemorySignedPreKeyStore
- java.lang.Object
-
- org.signal.libsignal.protocol.state.impl.InMemorySignedPreKeyStore
-
- All Implemented Interfaces:
SignedPreKeyStore
public class InMemorySignedPreKeyStore extends java.lang.Object implements SignedPreKeyStore
-
-
Constructor Summary
Constructors Constructor Description InMemorySignedPreKeyStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsSignedPreKey(int signedPreKeyId)SignedPreKeyRecordloadSignedPreKey(int signedPreKeyId)Load a local SignedPreKeyRecord.java.util.List<SignedPreKeyRecord>loadSignedPreKeys()Load all local SignedPreKeyRecords.voidremoveSignedPreKey(int signedPreKeyId)Delete a SignedPreKeyRecord from local storage.voidstoreSignedPreKey(int signedPreKeyId, SignedPreKeyRecord record)Store a local SignedPreKeyRecord.
-
-
-
Method Detail
-
loadSignedPreKey
public SignedPreKeyRecord loadSignedPreKey(int signedPreKeyId) throws InvalidKeyIdException
Description copied from interface:SignedPreKeyStoreLoad a local SignedPreKeyRecord.- Specified by:
loadSignedPreKeyin interfaceSignedPreKeyStore- Parameters:
signedPreKeyId- the ID of the local SignedPreKeyRecord.- Returns:
- the corresponding SignedPreKeyRecord.
- Throws:
InvalidKeyIdException- when there is no corresponding SignedPreKeyRecord.
-
loadSignedPreKeys
public java.util.List<SignedPreKeyRecord> loadSignedPreKeys()
Description copied from interface:SignedPreKeyStoreLoad all local SignedPreKeyRecords.- Specified by:
loadSignedPreKeysin interfaceSignedPreKeyStore- Returns:
- All stored SignedPreKeyRecords.
-
storeSignedPreKey
public void storeSignedPreKey(int signedPreKeyId, SignedPreKeyRecord record)Description copied from interface:SignedPreKeyStoreStore a local SignedPreKeyRecord.- Specified by:
storeSignedPreKeyin interfaceSignedPreKeyStore- Parameters:
signedPreKeyId- the ID of the SignedPreKeyRecord to store.record- the SignedPreKeyRecord.
-
containsSignedPreKey
public boolean containsSignedPreKey(int signedPreKeyId)
- Specified by:
containsSignedPreKeyin interfaceSignedPreKeyStore- Parameters:
signedPreKeyId- A SignedPreKeyRecord ID.- Returns:
- true if the store has a record for the signedPreKeyId, otherwise false.
-
removeSignedPreKey
public void removeSignedPreKey(int signedPreKeyId)
Description copied from interface:SignedPreKeyStoreDelete a SignedPreKeyRecord from local storage.- Specified by:
removeSignedPreKeyin interfaceSignedPreKeyStore- Parameters:
signedPreKeyId- The ID of the SignedPreKeyRecord to remove.
-
-