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

Class TransferData

Known Subclasses:
TransferClient, TransferServer

This class handles send_bytes and receive_bytes calls which both a TransferClient and a TransferServer object can make. This class is the parent class for those two classes.
Method Summary
  __init__(self)
  __del__(self)
frees the memory associated with the callaback handles
  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

__del__(self)
(Destructor)

frees the memory associated with the callaback handles

free_callback(self, cbHandle)

Free a callback.

Free's the underlying memory allocated for a callback structure.
Parameters:
cbHandle - A SWIG'ized pointer to a callback structure.

receive_bytes(self, request, buffer, wait_for_amount, callback, arg)

Parameters:
request - is a TransferRequest object it must be client side if it is used in conjunction with a get request must be server side if used in conjunction with a put or append request
buffer - A pyGlobus.util.Buffer.Buffer object.. This hides the internal globus_byte_t data buffer.
wait_for_amount - the minimum amount of data to wait to receive before the callback function is called,the data is received in the callback function
callback - is a function that is called after enough data has been received
arg - a user supplied argument 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:
TransferException - A TransferException if the request object does not meet the specifications above or if there is problem receiving the bytes

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
Parameters:
request - a server-side request if this is in conjunction with a get request, if in conjunction with a put or append this should be a client-side request
buffer - A pyGlobus.util.Buffer.Buffer object.. This hides the internal globus_byte_t data buffer.
eof - true if this is the last data to be sent, false otherwise
callback - is a function that is called after the data in the buffer has been sent
arg - a user supplied argument 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:
TransferException - A TransferException if the request object does not meet the specifications above or if there was a problem sending the data

Generated by Epydoc 2.1 on Tue Apr 4 14:32:53 2006 http://epydoc.sf.net