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

Class OperationAttr


A class to wrap the ftp client operation attr functions.

It provides get and set methods for all of the various operation specific attributes, and hides the underlying memory management.
Method Summary
  __init__(self, handle)
Constructs an instance.
  __del__(self)
Destroy an instance.
  copy(self)
Creates a deep copy of itself.
  get_append(self)
Returns the value of the append attribute.
  get_authorization(self)
Returns the authorization attributes.
  get_control_protection(self)
Returns the protection attribute for the control channel.
  get_data_protection(self)
Returns the protection attribute for the data channel.
  get_dcau(self)
Get the DCAU handle
  get_handle(self)
Return the underlying ftp client operation attr handle.
  get_layout(self)
Returns the layout attribute for this operation.
  get_mode(self)
Returns the mode for this transfer.
  get_parallelism(self)
Returns the parallelism attribute.
  get_tcp_buffer(self)
Return the tcp buffer attribute.
  get_type(self)
Returns the type attribute for the operation.
  set_append(self, append)
Set the append mode for the operation.
  set_authorization(self, credential, user, passwd, account, subject)
Set the authorization attributes.
  set_control_protection(self, protection)
Sets the protection attribute for the control channel.
  set_data_protection(self, protection)
Sets the protection attribute for the data channel.
  set_dcau(self, dcau)
Set the data channel authentication instance in the handle.
  set_layout(self, layout)
Sets the layout attribute for the transfer.
  set_mode(self, mode)
Sets the mode for the transfer.
  set_parallelism(self, parallelism)
Set the parallelism attribute.
  set_tcp_buffer(self, tcpbuffer)
Set the tcp buffer attribute.
  set_type(self, type)
Sets the type attribute for the operation.

Method Details

__init__(self, handle=None)
(Constructor)

Constructs an instance.

Activates the globus ftp client module and creates the underlying handle.
Raises:
OperationAttrException - A OperationAttrException is thrown if unable to initialize the module or create the handle.

__del__(self)
(Destructor)

Destroy an instance.

Deletes the underlying handle, and deactivates the underlying module.
Raises:
OperationAttrException - A OperationAttrException is thrown if unable to delete the handle or destroy the module.

copy(self)

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

get_append(self)

Returns the value of the append attribute.
Returns:
A boolean value is returned.
Raises:
OperationAttrException - A OperationAttrException is thrown if unable to return the append attribute.

get_authorization(self)

Returns the authorization attributes.
Returns:
  • A GSSCred object
  • A string containg the user name.
  • A string containing the password.
  • A string containing the account name.
  • A string containing the subject name of the server.
Raises:
OperationAttrException - A OperationAttrException is thrown if unable to get the authorization attributes.

get_control_protection(self)

Returns the protection attribute for the control channel.
Returns:
One of the attributes defined in the ftpControl module is returned.
Raises:
OperationAttrException - A OperationAttrException is thrown if unable to get the attribute.

get_data_protection(self)

Returns the protection attribute for the data channel.
Returns:
One of the attributes defined in the ftpControl module is returned.
Raises:
OperationAttrException - A OperationAttrException is thrown if unable to get the attribute.

get_dcau(self)

Get the DCAU handle
Returns:
A ftpControl.DCAU instance
Raises:
OperationAttrException - A OperationAttrException is raised if there is a problem setting the DCAU handle

get_handle(self)

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

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

get_layout(self)

Returns the layout attribute for this operation.
Returns:
A ftpControl.Layout object is returned.
Raises:
OperationAttrException - A OperationAttrException is thrown if unable to get the layout attribute.

get_mode(self)

Returns the mode for this transfer.
Returns:
One of the modes defined in the ftpControl module is returned.
Raises:
OperationAttrException - A OperationAttrException is thrown if unable to get the mode.

get_parallelism(self)

Returns the parallelism attribute.
Returns:
A ftpContol.Parallelism object is returned.
Raises:
OperationAttrException - A OperationAttrException is thrown if unable to get the parallelism attribute.

get_tcp_buffer(self)

Return the tcp buffer attribute.
Returns:
A ftpContol.TcpBuffer object is returned.
Raises:
OperationAttrException - A OperationAttrException is thrown if unable to get the tcp buffer attribute.

get_type(self)

Returns the type attribute for the operation.
Returns:
One of the types defined in the ftpControl module is returned.
Raises:
OperationAttrException - A OperationAttrException is thrown if unable to get the type attribute.

set_append(self, append)

Set the append mode for the operation.

Allows a file to be appended to when performing a put to a server instead of replacing the file. This attribute is incompatible with the extended block mode, the partial file attribute, and the restart attribute.
Parameters:
append - A boolean value.
Raises:
OperationAttrException - A OperationAttrException is thrown if unable to set the append attribute.

set_authorization(self, credential, user=None, passwd='', account='', subject='')

Set the authorization attributes.
Parameters:
credential - A SWIG'ized pointer to a gss_cred_id_t object. To use the default credential, use GSS_C_NO_CREDENTIAL. This can be returned from the gsi module.
user - The user name to send to the server.
passwd - A string containing the password to send to the server.
account - The account to use for the data transfer. Most ftp servers do not require this.
subject - The subject name of the ftp server. This is only needed for a gsiftp transfer when the security subject name does not match the subject name of the server.
Raises:
OperationAttrException - A OperationAttrException is thrown if uanbe to set the authorization attributes.

set_control_protection(self, protection)

Sets the protection attribute for the control channel.

The supported protection attributes are defined in the ftpControl module.
Parameters:
protection - One of the possible attributes defined in the ftpControl module.
Raises:
OperationAttrException - A OperationAttrException is thrown if unable to set the control protection attribute.

set_data_protection(self, protection)

Sets the protection attribute for the data channel.

The supported protection attributes are defined in the ftpControl module.
Parameters:
protection - One of the possible attributes defined in the ftpControl module.
Raises:
OperationAttrException - A OperationAttrException is thrown if unable to set the data protection attribute.

set_dcau(self, dcau)

Set the data channel authentication instance in the handle.
Parameters:
dcau - A ftpControl.DCAU instance
Raises:
OperationAttrException - A OperationAttrException is raised if there is a problem setting the DCAU handle

set_layout(self, layout)

Sets the layout attribute for the transfer.

This attribute allows the user to control the layout of a file being transfered to a striped Grid-FTP server. The striping layout defines what regions of a file will be stored on each stripe of a multiple-striped ftp server.

The layout attribute is used only when the data is being stored on the server (on a put or 3rd party transfer). This attribute is ignored for stream mode data transfers.
Parameters:
layout - A ftpControl.Layout object.
Raises:
OperationAttrException - A OperationAttrException is thrown if unable to set the layout attribute.

set_mode(self, mode)

Sets the mode for the transfer.

The supported modes are defined in the ftpControl module.
Parameters:
mode - One of the possible modes defined in the ftpControl module.
Raises:
OperationAttrException - A OperationAttrException is thrown if unable to set the mode.

set_parallelism(self, parallelism)

Set the parallelism attribute.

Used to control the level of parallelism used for the operation.
Parameters:
parallelism - A ftpContol.Parallelism object.
Raises:
OperationAttrException - A OperationAttrException is thrown if unable to set the parallelism attribute.

set_tcp_buffer(self, tcpbuffer)

Set the tcp buffer attribute.

Used to control the tcp buffer size for the operation.
Parameters:
tcpbuffer - A ftpContol.TcpBuffer object with the proper buffer size set.
Raises:
OperationAttrException - A OperationAttrException is thrown if unable to set the tcp buffer attribute.

set_type(self, type)

Sets the type attribute for the operation.

Controls the type used for the transfer. The types are defined in the ftpControl module. The default type is binary.
Parameters:
type - One of the types defined in the ftpControl module.
Raises:
OperationAttrException - A OperationAttrException is thrown if unable to set the type.

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