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

`RPC servlets.`

Modules

``

sys | traceback |  |

Classes

``

WebKit.HTTPServlet.HTTPServlet(WebKit.Servlet.Servlet)
  RPCServlet

class RPCServlet(WebKit.HTTPServlet.HTTPServlet)
`` | `RPCServlet is a base class for RPC servlets.`

Method resolution order:
  RPCServlet
  WebKit.HTTPServlet.HTTPServlet
  WebKit.Servlet.Servlet
  __builtin__.object

Methods defined here:

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 defined here:

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)`