Home | Trees | Index | Help |
|
---|
Package AccessGrid :: Module DataStore :: Class GSIHTTPTransferServer |
|
BaseServer
--+ |GSITCPServer
--+ |GSITCPSocketServer
--+ |TransferServer
--+ | GSIHTTPTransferServer
A GSIHTTPTransferServer is a Globus-enabled HTTP-based implementation of a TransferServer.
Note that most of the work is done in HTTPTransferHandler.
This implementation uses a pool of worker threads to handle the requests. We could just use SocketServer.ThreadingMixIn, but I worry about an unbounded number of incoming request overloading the server.
self.requestQueue is a Queue object. Each worker thread runs __WorkerRun(), which blocks on a get on teh request queue.
Incoming requests are just placed on the queue.Method Summary | |
---|---|
__init__(self,
address,
numThreads,
sslCompat)
| |
Return the download descriptor for this transfer server. | |
Create an identity token for this GSIHTTP-based transfer. | |
Return the upload descriptor for this transfer server. | |
Call finish_request. | |
run(self)
| |
stop(self)
| |
thread_run is the server thread's main function. | |
__WorkerRun(self,
workerNum)
| |
_CreateWorkers(self)
| |
_GetListenPort(self)
| |
Inherited from GSITCPSocketServer | |
Called to clean-up the server. | |
Inherited from GSITCPServer | |
Called to clean up an individual request. | |
Return socket file number. | |
| |
Get the request and client address from the socket. | |
Called by constructor to activate the server. | |
Called by constructor to bind the socket. | |
Inherited from BaseServer | |
Finish one request by instantiating RequestHandlerClass. | |
Handle an error gracefully. | |
Handle one request, possibly blocking. | |
Handle one request at a time until doomsday. | |
Verify the request. | |
Inherited from TransferServer | |
| |
Look up the information for transfer_key and file_num in the manifest. | |
A client has sent a POST to /<prefix>/manifest to initiate an upload. | |
|
Class Variable Summary | |
---|---|
Inherited from GSITCPServer | |
int |
address_family = 2 |
int |
allow_reuse_address = 0 |
int |
request_queue_size = 5 |
int |
socket_type = 1 |
Method Details |
---|
GetDownloadDescriptor(self, prefix, path)Return the download descriptor for this transfer server. Must be implemented by the protocol-specific subclass.
|
GetIdentityToken(self, transferHandler)Create an identity token for this GSIHTTP-based transfer. It contains the DN from the connection's security context. |
GetUploadDescriptor(self, prefix)Return the upload descriptor for this transfer server. Must be implemented by the protocol-specific subclass.
|
process_request(self, request, client_address)Call finish_request. Overridden by ForkingMixIn and ThreadingMixIn.
|
thread_run(self)thread_run is the server thread's main function. |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Thu Apr 14 16:39:31 2005 | http://epydoc.sf.net |