- """
- self._client.delete(self._nepi_topic)
-
- #XXX Why there is a sleep there ?
- time.sleep(1)
-
- # Wait the send queue to be empty before disconnect
- self._client.disconnect(wait=True)
- msg = " Disconnected from XMPP Server"
- self.debug(msg)
-
-
-class OMF6APIFactory(object):
- """
- .. note::
-
- It allows the different RM to use the same xmpp client if they use
- the same credentials. For the moment, it is focused on XMPP.
-
- """
- # use lock to avoid concurrent access to the Api list at the same times by 2
- # different threads
- lock = threading.Lock()
- _apis = dict()
-
- @classmethod
- def get_api(cls, host, user, port, password, exp_id = None):
- """ Get an OMF Api
-
- :param slice: Xmpp Slice Name
- :type slice: str
- :param host: Xmpp Server Adress
- :type host: str
- :param port: Xmpp Port (Default : 5222)
- :type port: str
- :param password: Xmpp Password
- :type password: str