T_IdKeyPair - IdentityKeyPair classT_IdKey - IdentityKey classT_PreKey - PreKey classT_SigPreKey - SignedPreKey classT_Sess - Session classT_Addr - Address classT_ECPub - Elliptic Curve PublicKey classT_Bundle - Bundle classT_Ciph - Cipher classpublic abstract class OmemoService<T_IdKeyPair,T_IdKey,T_PreKey,T_SigPreKey,T_Sess,T_Addr,T_ECPub,T_Bundle,T_Ciph> extends java.lang.Object implements OmemoCarbonCopyStanzaReceivedListener, OmemoMessageStanzaReceivedListener
| Modifier and Type | Field and Description |
|---|---|
protected static java.util.logging.Logger |
LOGGER |
| Modifier | Constructor and Description |
|---|---|
protected |
OmemoService()
Create a new OmemoService object.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract OmemoStore<T_IdKeyPair,T_IdKey,T_PreKey,T_SigPreKey,T_Sess,T_Addr,T_ECPub,T_Bundle,T_Ciph> |
createDefaultOmemoStoreBackend()
Create a default OmemoStore object.
|
static OmemoService<?,?,?,?,?,?,?,?,?> |
getInstance()
Return the singleton instance of this class.
|
protected OmemoRatchet<T_IdKeyPair,T_IdKey,T_PreKey,T_SigPreKey,T_Sess,T_Addr,T_ECPub,T_Bundle,T_Ciph> |
getOmemoRatchet(OmemoManager manager)
Return the deposited instance of the OmemoRatchet for the given manager.
|
OmemoStore<T_IdKeyPair,T_IdKey,T_PreKey,T_SigPreKey,T_Sess,T_Addr,T_ECPub,T_Bundle,T_Ciph> |
getOmemoStoreBackend()
Return the used omemoStore backend.
|
protected abstract OmemoRatchet<T_IdKeyPair,T_IdKey,T_PreKey,T_SigPreKey,T_Sess,T_Addr,T_ECPub,T_Bundle,T_Ciph> |
instantiateOmemoRatchet(OmemoManager manager,
OmemoStore<T_IdKeyPair,T_IdKey,T_PreKey,T_SigPreKey,T_Sess,T_Addr,T_ECPub,T_Bundle,T_Ciph> store)
Return a new instance of the OMEMO ratchet.
|
static boolean |
isServiceRegistered()
Returns true, if an instance of the service singleton is set.
|
void |
onOmemoCarbonCopyReceived(org.jivesoftware.smackx.carbons.packet.CarbonExtension.Direction direction,
org.jivesoftware.smack.packet.Message carbonCopy,
org.jivesoftware.smack.packet.Message wrappingMessage,
OmemoManager.LoggedInOmemoManager managerGuard) |
void |
onOmemoMessageStanzaReceived(org.jivesoftware.smack.packet.Stanza stanza,
OmemoManager.LoggedInOmemoManager managerGuard) |
protected abstract void |
processBundle(OmemoManager omemoManager,
T_Bundle contactsBundle,
OmemoDevice contactsDevice)
Process a received bundle.
|
void |
purgeDeviceList(OmemoManager.LoggedInOmemoManager managerGuard)
Publish a new DeviceList with just our device in it.
|
protected static void |
setInstance(OmemoService<?,?,?,?,?,?,?,?,?> omemoService)
Set singleton instance.
|
void |
setOmemoStoreBackend(OmemoStore<T_IdKeyPair,T_IdKey,T_PreKey,T_SigPreKey,T_Sess,T_Addr,T_ECPub,T_Bundle,T_Ciph> omemoStore)
Set an omemoStore as backend.
|
protected OmemoService()
public static OmemoService<?,?,?,?,?,?,?,?,?> getInstance()
protected static void setInstance(OmemoService<?,?,?,?,?,?,?,?,?> omemoService)
omemoService - instancepublic static boolean isServiceRegistered()
public OmemoStore<T_IdKeyPair,T_IdKey,T_PreKey,T_SigPreKey,T_Sess,T_Addr,T_ECPub,T_Bundle,T_Ciph> getOmemoStoreBackend()
public void setOmemoStoreBackend(OmemoStore<T_IdKeyPair,T_IdKey,T_PreKey,T_SigPreKey,T_Sess,T_Addr,T_ECPub,T_Bundle,T_Ciph> omemoStore)
omemoStore - store.protected abstract OmemoStore<T_IdKeyPair,T_IdKey,T_PreKey,T_SigPreKey,T_Sess,T_Addr,T_ECPub,T_Bundle,T_Ciph> createDefaultOmemoStoreBackend()
protected abstract OmemoRatchet<T_IdKeyPair,T_IdKey,T_PreKey,T_SigPreKey,T_Sess,T_Addr,T_ECPub,T_Bundle,T_Ciph> instantiateOmemoRatchet(OmemoManager manager, OmemoStore<T_IdKeyPair,T_IdKey,T_PreKey,T_SigPreKey,T_Sess,T_Addr,T_ECPub,T_Bundle,T_Ciph> store)
manager - OmemoManagerstore - OmemoStoreprotected OmemoRatchet<T_IdKeyPair,T_IdKey,T_PreKey,T_SigPreKey,T_Sess,T_Addr,T_ECPub,T_Bundle,T_Ciph> getOmemoRatchet(OmemoManager manager)
manager - OmemoManager we want to have the ratchet for.protected abstract void processBundle(OmemoManager omemoManager, T_Bundle contactsBundle, OmemoDevice contactsDevice) throws CorruptedOmemoKeyException
omemoManager - our OmemoManagercontactsBundle - bundle of the contactcontactsDevice - OmemoDevice of the contactCorruptedOmemoKeyExceptionpublic void onOmemoCarbonCopyReceived(org.jivesoftware.smackx.carbons.packet.CarbonExtension.Direction direction,
org.jivesoftware.smack.packet.Message carbonCopy,
org.jivesoftware.smack.packet.Message wrappingMessage,
OmemoManager.LoggedInOmemoManager managerGuard)
onOmemoCarbonCopyReceived in interface OmemoCarbonCopyStanzaReceivedListenerpublic void onOmemoMessageStanzaReceived(org.jivesoftware.smack.packet.Stanza stanza,
OmemoManager.LoggedInOmemoManager managerGuard)
onOmemoMessageStanzaReceived in interface OmemoMessageStanzaReceivedListenerpublic void purgeDeviceList(OmemoManager.LoggedInOmemoManager managerGuard) throws java.lang.InterruptedException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, org.jivesoftware.smack.SmackException.NoResponseException
managerGuard - authenticated OmemoManager.java.lang.InterruptedExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionSmackException.NoResponseException