Class t.w.x.x.XmlStreamFactoryMixin(object):

Part of twisted.words.xish.xmlstream View Source View In Hierarchy

Known subclasses: twisted.words.protocols.jabber.xmlstream.XmlStreamServerFactory, twisted.words.xish.xmlstream.XmlStreamFactory

XmlStream factory mixin that takes care of event handlers.

This mixin is for factories providing IProtocolFactory to make sure certain event observers are set up on protocols, before incoming data is processed. Such protocols typically derive from utility.EventDispatcher, like XmlStream.

You can set up bootstrap event observers using addBootstrap. The event and fn parameters correspond with the event and observerfn arguments to utility.EventDispatcher.addObserver.

All positional and keyword arguments passed to create this factory are passed on as-is to the protocol.
Instance VariablesargsPositional arguments passed to the protocol upon instantiation. (type: tuple. )
kwargsKeyword arguments passed to the protocol upon instantiation. (type: dict. )
Line # Kind Name Docs
175 Method __init__ Undocumented
181 Method buildProtocol Create an instance of XmlStream.
195 Method addBootstrap Add a bootstrap event handler.
202 Method removeBootstrap Remove a bootstrap event handler.
def __init__(self, *args, **kwargs): (source)
Undocumented
def buildProtocol(self, addr): (source)

Create an instance of XmlStream.

The returned instance will have bootstrap event observers registered and will proceed to handle input on an incoming connection.
def addBootstrap(self, event, fn): (source)
Add a bootstrap event handler.
def removeBootstrap(self, event, fn): (source)
Remove a bootstrap event handler.
API Documentation for Twisted, generated by pydoctor at 2008-10-26 16:12:37.