WebKit.XMLRPCServlet | index /usr/local/share/webware/WebKit/XMLRPCServlet.py

`XML-RPC servlet base class
Written by Geoffrey Talvola
See Examples/XMLRPCExample.py for sample usage.`

Modules
`` |  |
sys | traceback | xmlrpclib |

Classes
`` |  | WebKit.RPCServlet.RPCServlet(WebKit.HTTPServlet.HTTPServlet) XMLRPCServlet
class XMLRPCServlet(WebKit.RPCServlet.RPCServlet)
`` | `XMLRPCServlet is a base class for XML-RPC servlets. See Examples/XMLRPCExample.py for sample usage. For more Pythonic convenience at the cost of language independence, see PickleRPCServlet.`
| Method resolution order: XMLRPCServlet WebKit.RPCServlet.RPCServlet WebKit.HTTPServlet.HTTPServlet WebKit.Servlet.Servlet __builtin__.object Methods defined here: respondToPost(self, transaction) `Respond to a Post request. This is similar to the xmlrpcserver.py example from the xmlrpc library distribution, only it's been adapted to work within a WebKit servlet.` Data and other attributes defined here: allow_none = True Methods inherited from WebKit.RPCServlet.RPCServlet: awake(self, transaction) `Begin transaction.` call(self, methodName, *args, **keywords) `Call custom method. Subclasses may override this class for custom handling of methods.` resultForException(self, e, trans) `Get text for exception. Given an unhandled exception, returns the string that should be sent back in the RPC response as controlled by the RPCExceptionReturn setting.` sleep(self, transaction) `End transaction.` transaction(self) `Get the corresponding transaction. Most uses of RPC will not need this.` Static methods inherited from WebKit.RPCServlet.RPCServlet: exposedMethods() `Get exposed methods. Subclasses should return a list of methods that will be exposed through XML-RPC.` handleException(transaction) `Handle exception. If ReportRPCExceptionsInWebKit is set to True, then flush the response (because we don't want the standard HTML traceback to be appended to the response) and then handle the exception in the standard WebKit way. This means logging it to the console, storing it in the error log, sending error email, etc. depending on the settings.` sendOK(contentType, contents, trans, contentEncoding=None) `Send a 200 OK response with the given contents.` Methods inherited from WebKit.HTTPServlet.HTTPServlet: __init__(self) respond(self, trans) `Respond to a request. Invokes the appropriate respondToSomething() method depending on the type of request (e.g., GET, POST, PUT, ...).` respondToHead(self, trans) `Respond to a HEAD request. A correct but inefficient implementation.` Static methods inherited from WebKit.HTTPServlet.HTTPServlet: lastModified(trans) `Get time of last modification. Return this object's Last-Modified time (as a float), or None (meaning don't know or not applicable).` notImplemented(trans) Methods inherited from WebKit.Servlet.Servlet: close(self) log(self, message) `Log a message. This can be invoked to print messages concerning the servlet. This is often used by self to relay important information back to developers.` name(self) `Return the name which is simple the name of the class. Subclasses should *not* override this method. It is used for logging and debugging.` open(self) runMethodForTransaction(self, trans, method, *args, **kw) serverSidePath(self, path=None) `Return the filesystem path of the page on the server.` setFactory(self, factory) Static methods inherited from WebKit.Servlet.Servlet: canBeReused() `Returns whether a single servlet instance can be reused. The default is True, but subclasses con override to return False. Keep in mind that performance may seriously be degraded if instances can't be reused. Also, there's no known good reasons not to reuse an instance. Remember the awake() and sleep() methods are invoked for every transaction. But just in case, your servlet can refuse to be reused.` canBeThreaded() `Return whether the servlet can be multithreaded. This value should not change during the lifetime of the object. The default implementation returns False. Note: This is not currently used.` runTransaction(trans) Data descriptors inherited from WebKit.Servlet.Servlet: __dict__ `dictionary for instance variables (if defined)` __weakref__ `list of weak references to the object (if defined)`