'Start the XEP-0198 plugin.'

def plugin_init(self):

    if self.xmpp.is_component:
        return
    self.window_counter = self.window
    self.window_counter_lock = threading.Lock()
    self.enabled = threading.Event()
    self.unacked_queue = collections.deque()
    self.seq_lock = threading.Lock()
    self.handled_lock = threading.Lock()
    self.ack_lock = threading.Lock()
    register_stanza_plugin(StreamFeatures, stanza.StreamManagement)
    self.xmpp.register_stanza(stanza.Enable)
    self.xmpp.register_stanza(stanza.Enabled)
    self.xmpp.register_stanza(stanza.Resume)
    self.xmpp.register_stanza(stanza.Resumed)
    self.xmpp.register_stanza(stanza.Ack)
    self.xmpp.register_stanza(stanza.RequestAck)
    self.xmpp.end_session_on_disconnect = False
    self.xmpp.register_feature('sm', self._handle_sm_feature, restart=True, order=self.order)
    self.xmpp.register_feature('sm', self._handle_sm_feature, restart=True, order=self.resume_order)
    self.xmpp.register_handler(Callback('Stream    Management    Enabled', MatchXPath(stanza.Enabled.tag_name()), self._handle_enabled, instream=True))
    self.xmpp.register_handler(Callback('Stream    Management    Resumed', MatchXPath(stanza.Resumed.tag_name()), self._handle_resumed, instream=True))
    self.xmpp.register_handler(Callback('Stream    Management    Failed', MatchXPath(stanza.Failed.tag_name()), self._handle_failed, instream=True))
    self.xmpp.register_handler(Callback('Stream    Management    Ack', MatchXPath(stanza.Ack.tag_name()), self._handle_ack, instream=True))
    self.xmpp.register_handler(Callback('Stream    Management    Request    Ack', MatchXPath(stanza.RequestAck.tag_name()), self._handle_request_ack, instream=True))
    self.xmpp.add_filter('in', self._handle_incoming)
    self.xmpp.add_filter('out_sync', self._handle_outgoing)
    self.xmpp.add_event_handler('session_end', self.session_end)
