Package pyGlobus :: Module ftpClientPlugin :: Class RestartMarkerPlugin
[show private | hide private]
[frames | no frames]

Class RestartMarkerPlugin

Plugin --+
         |
        RestartMarkerPlugin


A wrapper class around the ftp client restart marker plugin.

This plugin is intended to allow users to make restart markers persistant. During a transfer, every marker received will result in the user's 'marker' callback being called with the new restart marker that can be stored. If the application were to prematurely terminate (while transferring), the user (after restarting the application) could pass this stored marker back to the plugin via the 'begin' callback to force the transfer to be restarted from the last marked point.
Method Summary
  __init__(self, beginCB, markerCB, completeCB, arg)
Initialize an instance of the GridFTP restart marker plugin.
  __del__(self)
Destroy an instance of the GridFTP restart marker plugin.
    Inherited from Plugin
  get_handle(self)
Return the underlying ftp client plugin handle.

Method Details

__init__(self, beginCB, markerCB, completeCB, arg)
(Constructor)

Initialize an instance of the GridFTP restart marker plugin.

This function will initialize the restart 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_marker)' 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, a SWIG'ized pointer to an uninitialized restart marker,

The function must return an int indicating whether the transfer should continue from the restart or start from the beginning.
markerCB -

The callback to be called with each restart marker received. It has the following signature

'function(arg, handle, restart_marker)' where arg is the argument passed into this call, handle is a SWIG'ized pointer to a ftp client handle object, restart_marker is a SWIG'ized pointer to the restart marker that has been received
completeCB -

The callback to be called to indicate transfer completion. It has the following signature

'function(arg, handle, restart_marker, error, error_url)' where arg is the argument passed into this call, handle is a SWIG'ized pointer to a ftp client handle object, error is an error string indicating the error that occurred, error_url is the url which is the source of the above error
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__

__del__(self)
(Destructor)

Destroy an instance of the GridFTP restart marker plugin.

This function will free all debugging plugin-specific instance data from this plugin, and will make the plugin unusable for further ftp handle creation.

Existing FTP client handles and handle attributes will not be affected by destroying a plugin associated with them, as a local copy of the plugin is made upon handle initialization.
Raises:
PluginException - A PluginException is thrown if unable to destroy the plugin.

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