def __init__(self, topic, host, userid, password, port=DEFAULT_STOMP_PORT):
        """
        Parameters:

          topic (:term:`string`): Name of the HMC notification topic.
            Must not be `None`.

          host (:term:`string`):
            HMC host. For valid formats, see the
            :attr:`~zhmcclient.Session.host` property.
            Must not be `None`.

          userid (:term:`string`):
            Userid of the HMC user to be used.
            Must not be `None`.

          password (:term:`string`):
            Password of the HMC user to be used.
            Must not be `None`.

          port (:term:`integer`):
            STOMP TCP port. Defaults to
            :attr:`~zhmcclient._constants.DEFAULT_STOMP_PORT`.
        """
        self._topic = topic
        self._host = host
        self._port = port
        self._userid = userid
        self._password = password

        # Wait timeout to honor keyboard interrupts after this time:
        self._wait_timeout = 10.0  # seconds

        # Subscription ID. We use some value that allows to identify on the
        # HMC that this is the zhmcclient, but otherwise we are not using
        # this value ourselves.
        self._sub_id = 'zhmcclient.%s' % id(self)

        # Sync variables for thread-safe handover between listener thread and
        # receiver thread:
        self._handover_dict = {}
        self._handover_cond = threading.Condition()

        self._conn = stomp.Connection(
            [(self._host, self._port)], use_ssl="SSL")
        listener = _NotificationListener(self._handover_dict,
                                         self._handover_cond)
        self._conn.set_listener('', listener)
        self._conn.start()
        self._conn.connect(self._userid, self._password, wait=True)

        dest = "/topic/" + topic
        self._conn.subscribe(destination=dest, id=self._sub_id, ack='auto')
def __init__ ( self , topic , host , userid , password , port = DEFAULT_STOMP_PORT ) : self . _topic = topic self . _host = host self . _port = port self . _userid = userid self . _password = password self . _wait_timeout = 10.0 self . _sub_id = 'zhmcclient.%s' % id ( self ) self . _handover_dict = { } self . _handover_cond = threading . Condition ( ) self . _conn = stomp . Connection ( [ ( self . _host , self . _port ) ] , use_ssl = "SSL" ) listener = _NotificationListener ( self . _handover_dict , self . _handover_cond ) self . _conn . set_listener ( '' , listener ) self . _conn . start ( ) self . _conn . connect ( self . _userid , self . _password , wait = True ) dest = "/topic/" + topic self . _conn . subscribe ( destination = dest , id = self . _sub_id , ack = 'auto' )
Parameters:

          topic (:term:`string`): Name of the HMC notification topic.
            Must not be `None`.

          host (:term:`string`):
            HMC host. For valid formats, see the
            :attr:`~zhmcclient.Session.host` property.
            Must not be `None`.

          userid (:term:`string`):
            Userid of the HMC user to be used.
            Must not be `None`.

          password (:term:`string`):
            Password of the HMC user to be used.
            Must not be `None`.

          port (:term:`integer`):
            STOMP TCP port. Defaults to
            :attr:`~zhmcclient._constants.DEFAULT_STOMP_PORT`.