Package pyGlobus :: Module gassTransfer :: Class TransferServer
[show private | hide private]
[frames | no frames]

Class TransferServer

TransData --+
            |
           TransferServer


__init__ creates a TransListener object which is the listener associated with the TransferServer
Method Summary
  __init__(self, scheme)
*Args*
  __del__(self)
  authorize(self, request, length)
After the server has accepted a request it can authorize the request if it wants the transfer to proceed
  deny(self, request, reason, message)
  get_base_url(self)
Calls the listener's get base url function
  register_accept(self, attr, callback, arg)
Has the server accept an incoming client request This function should be called after the callback for register_listen has been called back Does not block
  register_listen(self, callback, arg)
Has the server listen for incoming client request
    Inherited from TransData
  free_callback(self, cbHandle)
Free a callback.
  receive_bytes(self, request, buffer, wait_for_amount, callback, arg)
Return a SWIG'ized pointer to the callback handle is returned.
  send_bytes(self, request, buffer, eof, callback, arg)
After authorizing a request the server calls send bytes which sends the data in the buffer object

Method Details

__init__(self, scheme)
(Constructor)

*Args*

*scheme* is a string of the protocol that will be used
Overrides:
pyGlobus.gassTransfer.TransData.__init__

authorize(self, request, length=0)

After the server has accepted a request it can authorize the request if it wants the transfer to proceed
Parameters:
request - a server side request returned from the register_accept call
length - the number of bytes that the request is authorized to make the default 0, will use GLOBUS_GASS_TRANSFER_LENGTH_UNKNOWN
Returns:
returns a TransRequest object which will be needed for a send_bytes call
Raises:
TransferServerException - A TransferServerException if the request cannnot be authorized

get_base_url(self)

Calls the listener's get base url function

register_accept(self, attr, callback, arg)

Has the server accept an incoming client request This function should be called after the callback for register_listen has been called back Does not block
Parameters:
attr - a ListenerAttr object
callback - the function that will be called as soon a a client request is registered
arg - a user supplied arguement to the callback function
Returns:
A TransRequest object is returned the request object is a server_side request
Raises:
GassTransferServerException - A GassTransferServerException is Raised if the server is unable to accept this client request

register_listen(self, callback, arg)

Has the server listen for incoming client request

Does not block
Parameters:
callback - the function that will be called as soon a a client request is registered
arg - a user supplied arguement to the callback function
Returns:
A SWIG'ized pointer to the callback handle is returned. After the callback completes, this may be free'd with the free_callback method, or it will be free'd when the instance is destroyed.
Raises:
GassTransferServerException - A GassTransferServerException is Raised if the server is unable to listen for client requests

Generated by Epydoc 2.1 on Wed Dec 15 16:10:34 2004 http://epydoc.sf.net