common.messagereader (version 0.1, 9 April 2003)
index
e:\bothans\common\messagereader.py

This module contains a MessageReader class that uses DOM to
return a tuple tree representing a xml message it reads from a file-like
object

 
Modules
            
common
logging
thread
threading
 
Classes
            
threading.Thread(threading._Verbose)
MessageReader
PeerMessageReader
 
class MessageReader(threading.Thread)
       This is a message reader reading messages in a background thread
and forwarding them to a MessageRouter (see module MessageRouting)
 
Usage:
>>> mr = MessageReader(router,file)
>>> mr.start()
 
# you can end processing by calling stop() or by closing the file
>>> mr.stop()
#or
>>> file.close()
 
  
Method resolution order:
MessageReader
threading.Thread
threading._Verbose

Methods defined here:
__init__(self, router, file)
 TODO
_exit(self)
_makeMessage(self, messagestring)
_readSomething(self)
run(self)
 ***should not be called***
process the file
stop(self)

Data and non-method functions defined here:
__doc__ = ' This is a message reader reading messages in a ... mr.stop()\n #or\n >>> file.close()\n \n '
__module__ = 'common.messagereader'

Methods inherited from threading.Thread:
_Thread__bootstrap = __bootstrap(self)
_Thread__delete = __delete(self)
_Thread__stop = __stop(self)
__repr__(self)
_set_daemon(self)
getName(self)
isAlive(self)
isDaemon(self)
join(self, timeout=None)
setDaemon(self, daemonic)
setName(self, name)
start(self)

Data and non-method functions inherited from threading.Thread:
_Thread__initialized = 0

Methods inherited from threading._Verbose:
_note(self, format, *args)
 
class PeerMessageReader(MessageReader)
       Read Messages from a peer (when the file like object is a socket)
 
  
Method resolution order:
PeerMessageReader
MessageReader
threading.Thread
threading._Verbose

Methods defined here:
__init__(self, router, peer)
 - router is the router where messages will be put
- peer is an instance of the Peer class which has a rfile and a wfile attribute
_exit(self)
_makeMessage(self, messagestring)
 Create a Message from a string and set the peer attribute
_readSomething(self)

Data and non-method functions defined here:
__doc__ = ' Read Messages from a peer (when the file like object is a socket)\n '
__module__ = 'common.messagereader'

Methods inherited from MessageReader:
run(self)
 ***should not be called***
process the file
stop(self)

Methods inherited from threading.Thread:
_Thread__bootstrap = __bootstrap(self)
_Thread__delete = __delete(self)
_Thread__stop = __stop(self)
__repr__(self)
_set_daemon(self)
getName(self)
isAlive(self)
isDaemon(self)
join(self, timeout=None)
setDaemon(self, daemonic)
setName(self, name)
start(self)

Data and non-method functions inherited from threading.Thread:
_Thread__initialized = 0

Methods inherited from threading._Verbose:
_note(self, format, *args)
 
Data
             __author__ = 'Michel Rasschaert <mrasschaert@neocles.com>'
__date__ = '9 April 2003'
__file__ = r'e:\bothans\common\messagereader.pyc'
__license__ = 'This file is part of Bothans\n\n Bothans is fre...lace, Suite 330, Boston, MA 02111-1307 USA\n '
__name__ = 'common.messagereader'
__status__ = 'alpha'
__version__ = '0.1'
log = <logging.Logger instance at 0x007AB9D8>
 
Author
             Michel Rasschaert <mrasschaert@neocles.com>