Package bitfling :: Module xmlrpcstuff :: Class Server
[show private | hide private]
[frames | no frames]

Type Server

object --+        
         |        
  _Verbose --+    
             |    
        Thread --+
                 |
                Server


Method Summary
  __init__(self, host, port, servercert, connectionthreadcount, timecheck, connectionidlebreak)
Creates the listening thread and infrastructure.
  OnConnectionClose(self, clientaddr)
Called when a connection closes
  OnLog(self, str)
Process a log message
  OnLogException(self, exc)
Process an exception message
  OnMethodDispatch(self, method, params, username, clientaddr)
Called once the XML-RPC request is parsed
  OnNewAccept(self, clientaddr)
Decide if we accept a new new connection
  OnNewUser(self, clientaddr, username, password)
Decide if a user is allowed to authenticate
  OnUserMessage(self, msg)
Called when a message arrives in the workqueue
  OnXmlRpcRequest(self, xmldata, username, clientaddr)
Called when an XML-RPC request arrives, but before the XML is parsed
  processmessage(self, msg)
  run(self)
  run22(self)
  run23(self)
  shutdown(self)
Requests a shutdown of all threads
    Inherited from Thread
  __repr__(self)
  getName(self)
  isAlive(self)
  isDaemon(self)
  join(self, timeout)
  setDaemon(self, daemonic)
  setName(self, name)
  start(self)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
type ConnectionThread = bitfling.xmlrpcstuff.ConnectionThread
classobj Message = bitfling.xmlrpcstuff.Message

Method Details

__init__(self, host, port, servercert, connectionthreadcount=5, timecheck=60, connectionidlebreak=240)
(Constructor)

Creates the listening thread and infrastructure. Don't forget to call start() if you want anything to be processed! You probably also want to call setDaemon(). Remember to load a certificate into the sslcontext.
Parameters:
connectionthreadcount - How many threads are being used. If new connections arrive while the existing threads are busy in connections, then they will be ignored
timecheck - How often shutdown requests are checked for in the main thread (only valid on Python 2.3+)
connectionidlebreak - If an SSH connection is idle for this amount of time then it is closed
Overrides:
threading.Thread.__init__

OnConnectionClose(self, clientaddr)

Called when a connection closes

OnLog(self, str)

Process a log message

OnLogException(self, exc)

Process an exception message

OnMethodDispatch(self, method, params, username, clientaddr)

Called once the XML-RPC request is parsed

OnNewAccept(self, clientaddr)

Decide if we accept a new new connection

OnNewUser(self, clientaddr, username, password)

Decide if a user is allowed to authenticate

OnUserMessage(self, msg)

Called when a message arrives in the workqueue

OnXmlRpcRequest(self, xmldata, username, clientaddr)

Called when an XML-RPC request arrives, but before the XML is parsed

shutdown(self)

Requests a shutdown of all threads

Generated by Epydoc 2.1 on Fri Aug 15 18:58:37 2008 http://epydoc.sf.net