Class OmemoService<T_IdKeyPair,​T_IdKey,​T_PreKey,​T_SigPreKey,​T_Sess,​T_Addr,​T_ECPub,​T_Bundle,​T_Ciph>

    • Field Detail

      • LOGGER

        protected static final java.util.logging.Logger LOGGER
    • Constructor Detail

      • OmemoService

        protected OmemoService()
    • Method Detail

      • getInstance

        public static OmemoService<?,​?,​?,​?,​?,​?,​?,​?,​?> getInstance()
        Return the singleton instance of this class. When no instance is set, throw an IllegalStateException instead.
        Returns:
        instance.
      • setInstance

        protected static void setInstance​(OmemoService<?,​?,​?,​?,​?,​?,​?,​?,​?> omemoService)
        Set singleton instance. Throws an IllegalStateException, if there is already a service set as instance.
        Parameters:
        omemoService - instance
      • isServiceRegistered

        public static boolean isServiceRegistered()
        Returns true, if an instance of the service singleton is set. Otherwise return false.
        Returns:
        true, if instance is not null.
      • processBundle

        protected abstract void processBundle​(OmemoManager omemoManager,
                                              T_Bundle contactsBundle,
                                              OmemoDevice contactsDevice)
                                       throws CorruptedOmemoKeyException
        Process a received bundle. Typically that includes saving keys and building a session.
        Parameters:
        omemoManager - our OmemoManager
        contactsBundle - bundle of the contact
        contactsDevice - OmemoDevice of the contact
        Throws:
        CorruptedOmemoKeyException - if the OMEMO key is corrupted.
      • purgeDeviceList

        public void purgeDeviceList​(OmemoManager.LoggedInOmemoManager managerGuard)
                             throws java.lang.InterruptedException,
                                    org.jivesoftware.smack.XMPPException.XMPPErrorException,
                                    org.jivesoftware.smack.SmackException.NotConnectedException,
                                    org.jivesoftware.smack.SmackException.NoResponseException,
                                    java.io.IOException,
                                    org.jivesoftware.smackx.pubsub.PubSubException.NotALeafNodeException
        Publish a new DeviceList with just our device in it.
        Parameters:
        managerGuard - authenticated OmemoManager.
        Throws:
        java.lang.InterruptedException - if the calling thread was interrupted.
        org.jivesoftware.smack.XMPPException.XMPPErrorException - if there was an XMPP error returned.
        org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
        org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
        java.io.IOException - if an I/O error occurred.
        org.jivesoftware.smackx.pubsub.PubSubException.NotALeafNodeException - if a PubSub leaf node operation was attempted on a non-leaf node.