Package glue :: Module LDBDServer :: Class ServerHandler
[hide private]
[frames] | no frames]

Class ServerHandler

source code

SocketServer.BaseRequestHandler --+
                                  |
                                 ServerHandler

An instance of this class is created to service each request of the server.

Instance Methods [hide private]
 
__reply__(self, code, msg)
Format and send a reply back down the socket to the client.
source code
 
handle(self)
This method does all the work of servicing a request to the server.
source code
 
insert(self, arg) source code
 
insertdmt(self, arg) source code
 
insertmap(self, arg) source code
 
ping(self, arg)
Bounce back alive statment.
source code
 
query(self, arg)
Execute an SQL query on the database and return the result as LIGO_LW XML
source code

Inherited from SocketServer.BaseRequestHandler: __init__, finish, setup

Method Details [hide private]

__reply__(self, code, msg)

source code 

Format and send a reply back down the socket to the client. The file representing the socket is closed at the end of this method.

Parameters:
  • code - integer representing the error code with 0 for success
  • msg - object to be passed back to the client, either a string or a list of items that can be represented by strings
Returns:
None

handle(self)

source code 

This method does all the work of servicing a request to the server. See the documentation for the standard module SocketServer.

The input from the socket is parsed for the method with the remaining strings stripped of null bytes passed to the method in a list.

There are no parameters. When the instance of the class is created to process the request all necessary information is made attributes of the class instance.

Returns:
None
Overrides: SocketServer.BaseRequestHandler.handle

ping(self, arg)

source code 

Bounce back alive statment. Corresponds to the PING method in the ldbdd RPC protocol.

Parameters:
  • arg - list (perhaps empty) of strings representing message sent by client to server
Returns:
None

query(self, arg)

source code 

Execute an SQL query on the database and return the result as LIGO_LW XML

Parameters:
  • arg - a text string containing an SQL query to be executed
Returns:
None