__init__(self,
beginCB,
markerCB,
completeCB,
arg)
(Constructor)
Initialize an instance of the GridFTP performance marker plugin.
This function will initialize the performance marker plugin-specific
instance data for this plugin, and will make the plugin usable for ftp
client handle attribute and handle creation.
-
- Parameters:
beginCB -
The callback to be called upon the start of the transfer. It
has the following signature
'function(arg, handle, srcUrl, destUrl, restart)' where arg is
the argument passed into this call, handle is a SWIG'ized pointer
to a ftp client handle object, srcUrl is the a string
representing the source url, destUrl is the a string representing
the destination url, is an int indicating whether this callback
is the result of a restart
markerCB -
The callback to be called with each performance marker
received. It has the following signature
'function(arg, handle, time_stamp, time_stamp_length,
stripe_ndx, num_stripes, nbytes)' where arg is the argument
passed into this call, handle is a SWIG'ized pointer to a ftp
client handle object, time_stamp is an int indicating the
timestamp at which the number of bytes is valid,
time_stamp_length (not documented and I haven't gotten this to
work MKR), stripe_ndx an int indicating the stripe index this
data refers to, num_stripes an int indicating the total number of
stripes involved in this transfer, nbytes an int indicating the
total bytes transfered on this stripe.
completeCB -
The callback to be called to indicate transfer completion. It
has the following signature
'function(arg, handle, error)' where arg is the argument
passed into this call, handle is a SWIG'ized pointer to a ftp
client handle object, error is a tuple (error_code,
error_description). If there is no error, the error_code is 0 and
the error description is a None object.
arg -
An arbitary argument to be passed to all the callbacks.
- Raises:
PluginException -
A PluginException is thrown if unable
to init the plugin.
- Overrides:
pyGlobus.ftpClientPlugin.Plugin.__init__
|