Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
BaseRequestHandler Class Reference
Inheritance diagram for BaseRequestHandler:
DatagramRequestHandler StreamRequestHandler BaseHTTPRequestHandler SimpleHTTPRequestHandler SimpleXMLRPCRequestHandler CGIHTTPRequestHandler

Public Member Functions

def __init__
 
def setup
 
def handle
 
def finish
 

Data Fields

 request
 
 client_address
 
 server
 

Detailed Description

Base class for request handler classes.

This class is instantiated for each request to be handled.  The
constructor sets the instance variables request, client_address
and server, and then calls the handle() method.  To implement a
specific service, all you need to do is to derive a class which
defines a handle() method.

The handle() method can find the request as self.request, the
client address as self.client_address, and the server (in case it
needs access to per-server information) as self.server.  Since a
separate instance is created for each request, the handle() method
can define arbitrary other instance variariables.

Definition at line 490 of file SocketServer.py.

Constructor & Destructor Documentation

def __init__ (   self,
  request,
  client_address,
  server 
)

Definition at line 508 of file SocketServer.py.

509  def __init__(self, request, client_address, server):
510  self.request = request
511  self.client_address = client_address
512  self.server = server
513  try:
514  self.setup()
515  self.handle()
516  self.finish()
517  finally:
518  sys.exc_traceback = None # Help garbage collection

Member Function Documentation

def finish (   self)

Definition at line 525 of file SocketServer.py.

526  def finish(self):
527  pass
528 
529 
530 # The following two classes make it possible to use the same service
531 # class for stream or datagram servers.
532 # Each class sets up these instance variables:
533 # - rfile: a file object from which receives the request is read
534 # - wfile: a file object to which the reply is written
535 # When the handle() method returns, wfile is flushed properly
536 
def handle (   self)

Definition at line 522 of file SocketServer.py.

523  def handle(self):
524  pass
def setup (   self)

Definition at line 519 of file SocketServer.py.

520  def setup(self):
521  pass

Field Documentation

client_address

Definition at line 510 of file SocketServer.py.

request

Definition at line 509 of file SocketServer.py.

server

Definition at line 511 of file SocketServer.py.


The documentation for this class was generated from the following file: