Package pyGlobus :: Module ftpClientAttr :: Class HandleAttr
[show private | hide private]
[frames | no frames]

Class HandleAttr


A class to wrap the ftp client handle attr functions.

It provides get and set methods for all of the various handle specific attributes, and hides the underlying memory management.
Method Summary
  __init__(self, handle, own)
Constructs an instance.
  __del__(self)
Destroy an instance.
  add_cached_url(self, url)
Enable caching for the specified url.
  add_plugin(self, plugin)
Add a plugin to a handle attribute set.
  copy(self)
Creates a deep copy of itself.
  get_cache_all(self)
Return the cache all attribute.
  get_handle(self)
Return the underlying ftp client handle attr handle.
  remove_cached_url(self, url)
Disable caching for the specified url.
  remove_plugin(self, plugin)
Remove a plugin from a handle attribute set.
  set_cache_all(self, cacheAll)
Set the cache all attribute.
  set_netlogger(self, nl_handle)
Set netlogger handle.

Method Details

__init__(self, handle=None, own=1)
(Constructor)

Constructs an instance.

Activates the globus ftp client module and creates the ftp handle attr.
Parameters:
handle - A SWIG'ized pointer to a globus ftp client handleattr pointer. Used to construct an instance from an existing pointer.
own - True if the class owns the underlying pointer.
Raises:
HandleAttr - A HandleAttr exception is thrown if unable to activate the module or create the handle.

__del__(self)
(Destructor)

Destroy an instance.

Deletes the ftp attr handle and deactivates the underlying globus module.
Raises:
HandleAttrException - A HandleAttrException is thrown if unable to destroy the handle or deactivate the module.

add_cached_url(self, url)

Enable caching for the specified url.

The handle will keep the connection to the specified url open in between ftp operations.
Parameters:
url - The url to cache.
Raises:
HandleAttrException - A HandleAttrException is thrown if unable to cache the url.

add_plugin(self, plugin)

Add a plugin to a handle attribute set.

Each handle attribute set contains a list of plugins associated with it. When a handle is created with a particular attribute set, it will be associated with a copy of those plugins.

Only one instance of a specific plugin may be added to an attribute set. Each plugin must have a different name.

A copy of the plugin is created via the plugins 'copy' method when it is added to an attribute set. Thus, any changes to a particular plugin must be done before the plugin is added to an attribute set, and before the attribute set is used to create handles.
Parameters:
plugin - A Plugin class.
Raises:
HandleAttrException - A HandleAttrException is thrown if unable to add the plugin.

copy(self)

Creates a deep copy of itself.
Returns:
A new HandleAttr object with the same properties as the original is returned.
Raises:
HandleAttrException - A HandleAttrException is thrown if unable to make the copy.

get_cache_all(self)

Return the cache all attribute.

If true, all connections on the handle will be cached in between connections. When this is enabled, the user skips the authentication handshake and connection establishment overhead for multiple subsequent ftp operations to the same server.
Raises:
HandleAttrException - A HandleAttrException is thrown if unable to return the attribute.

get_handle(self)

Return the underlying ftp client handle attr handle.
Returns:
A string containing the pointer.

Warning: This handle is only valid as long as this object exists. When

remove_cached_url(self, url)

Disable caching for the specified url.

The handle will no longer keep the connection open to the specified url between connections.
Parameters:
url - The url to remove from the cache.
Raises:
HandleAttrException - A HandleAttrException is thrown if unable to remove the url from the cache.

remove_plugin(self, plugin)

Remove a plugin from a handle attribute set.

Each handle attribute set contains a list of plugins associated with it. When a handle is created with a particular attribute set, it will be associated with a copy of those plugins.

Only one instance of a specific plugin may be added to an attribute set. Each plugin must have a different name.

A copy of the plugin is created via the plugins 'copy' method when it is added to an attribute set. Thus, any changes to a particular plugin must be done before the plugin is added to an attribute set, and before the attribute set is used to create handles.
Parameters:
plugin - A Plugin class.
Raises:
HandleAttrException - A HandleAttrException is thrown if unable to remove the plugin.

set_cache_all(self, cacheAll)

Set the cache all attribute.

If true, all connections on the handle will be cached in between connections. When this is enabled, the user skips the authentication handshake and connection establishment overhead for multiple subsequent ftp operations to the same server.
Parameters:
cacheAll - A boolean describing whether to cache all connections or not.
Raises:
HandleAttrException - A HandleAttrException is thrown if unable to set the attribute.

set_netlogger(self, nl_handle)

Set netlogger handle.
Parameters:
nl_handle - A netlogger handle.
Raises:
HandleAttrException - A HandleAttrException is thrown if unable to add the plugin.

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