'Register with the XML stream.
Populates stream\'s list of initializers, along with their
requiredness. This list is used by
L{ConnectAuthenticator.initializeStream} to perform the initialization
steps.'

def associateWithStream(self, xs):

    xmlstream.ConnectAuthenticator.associateWithStream(self, xs)
    xs.initializers = [CheckVersionInitializer(xs)]
    inits = [(xmlstream.TLSInitiatingInitializer, False), (sasl.SASLInitiatingInitializer, True), (BindInitializer, False), (SessionInitializer, False)]
    for (initClass, required) in inits:
        init = initClass(xs)
        init.required = required
        xs.initializers.append(init)
