Package pyxmpp2 :: Module xmppparser :: Class StreamReader
[hide private]

Class StreamReader


XML stream reader.
Instance Methods [hide private]
 
__init__(self, handler)
Initialize the reader.
 
feed(self, data)
Feed the parser with a chunk of data.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]
bool _started
flag set after the first byte is pushed to the parser
XMLStreamHandler handler
object to receive parsed stream elements
bool in_use
re-entrancy protection
threading.RLock lock
lock to protect the object
ElementTree.XMLParser parser
the xml parser
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, handler)
(Constructor)

 
Initialize the reader.
Parameters:
Overrides: object.__init__

feed(self, data)

 
Feed the parser with a chunk of data. Apropriate methods of handler will be called whenever something interesting is found.
Parameters:
  • data (str) - the chunk of data to parse.