Table of Contents

Class: FtpControl ./pyGlobus/ftpControl.py
Methods   
__del__
__init__
abort
authenticate
code
control_connect
create_data_info
data_add_channels
data_connect
data_connect_read
data_query_channels
data_read
data_remove_channels
data_send_eof
data_write
data_write_stripe
force_close
get_handle
get_pbsz
get_total_data_channels
local_dcau
local_mode
local_parallelism
local_pasv
local_pbsz
local_port
local_send_eof
local_spas
local_spor
local_stru
local_tcp_buffer
operation
quit
raw_command
read_commands
release_data_info
send_command
send_response
x_data_write_stripe
  __del__ 
__del__ ( self )

Exceptions   
ex
  __init__ 
__init__ ( self,  handle=None )

Exceptions   
ex
  abort 
abort (
        self,
        callback,
        arg,
        )

send an ABORT to the FTP server and register a response handler args callback a Python function that has the signature func(user_arg,handle, error, ftp_response) arg the user_arg to the callback function Returns returns a SWIG'ized callback handle

Throws throws a FtpControlException if the ABORT message could not be sent

Exceptions   
ex
  authenticate 
authenticate (
        self,
        auth_info,
        use_auth,
        callback,
        arg,
        )

authenticate the user to the FTP server args auth_info a Python object which wraps a globus_auth_info object use_auth a boolean which if true GSS authentication will be used, otherwise username, password authentication will be used callback a Python function that has the signature func(user_arg,handle, error, ftp_response) arg the user_arg to the callback function

Returns returns a SWIG'ized callback handle

Throws throws a FtpControlException if the command could not be sent

Exceptions   
ex
  code 
code ( self,  command )

  control_connect 
control_connect (
        self,
        host,
        port,
        callback,
        arg,
        )

Create a new control connectiong to an FTP server. args host the hostname on a FTP Server port the TCP port number on a FTP Server callback a Python function that has the signature func(user_arg,handle, error, ftp_response) arg the user_arg to the callback function

Returns returns a SWIG'ized callback handle

Throws throws a FtpControlException if a connection could not be initiated

Exceptions   
ex
  create_data_info 
create_data_info (
        self,
        buffer,
        offset,
        eof,
        callback,
        arg,
        )

Creates a write_info data structure, args buffer is a pyGlobus.util Buffer object offset file offset of the data specified eof boolean denoting whether an end of file has been reached callback a python function that has the signature func(user_arg, handle, error, buffer, length, offset, eof) arg a user supplied arguement to the callback function

Returns returns a SWIG'ized callback handle, and a SWIG'ized write_info pointer

Throws throws a FtpControlException if the write_info object could not be created

TODO should the write info object be in its own class, or a member variable for the ftpControl class?

Exceptions   
ex
  data_add_channels 
data_add_channels (
        self,
        num_channels,
        stripe_ndx,
        )

Opens additional data channels (connections) to the host identified by the stripe parameter args num_channels The number of additional channels to add stripe_ndx The stripe that the channels will belong to

Returns nothing

Throws throws a FtpControlException if the channels could not be added

Exceptions   
ex
  data_connect 
data_connect (
        self,
        callback,
        arg,
        )

Exceptions   
ex
  data_connect_read 
data_connect_read (
        self,
        callback,
        arg,
        )

Create an incoming FTP data connection

args callback a python function that has the signature func(user_arg, handle, error, buffer, length, offset, eof) arg the user_arg to the callback function Returns returns a SWIG'ized callback handle

Throws throws a FtpControlException if the data connection could not be created

Exceptions   
ex
  data_query_channels 
data_query_channels ( self,  stripe_ndx )

Returns the number of currently open channels for the host identified by the stripe parameter args stripe_ndx The stripe that you wish to query

Returns number of channels on that stripe

Throws throws a FtpControlException if the stripe could not be queried

Exceptions   
ex
  data_read 
data_read (
        self,
        buffer,
        callback,
        arg,
        )

Reads data from data connection(s) and puts it in the specified buffer

Exceptions   
ex
  data_remove_channels 
data_remove_channels (
        self,
        num_channels,
        stripe_ndx,
        )

Removes data channels, to the host identified by the stripe parameter args num_channels The number of additional channels to add stripe_ndx The stripe that the channels will belong to

Returns nothing

Throws throws a FtpControlException if the channels could not be removed

Exceptions   
ex
  data_send_eof 
data_send_eof (
        self,
        eof_array,
        eof,
        callback,
        arg,
        )

Sends an eof message to each stripe along an open data connection args eof_array a python argument which wraps an array of integers. The array of integers should contain an integer that will be added to the curretn parallel data connection count on each stripe. The order of the integers corresponds to th eeach stripe in the same order as what was returned from local_port() eof boolean which is the eof message to be sent to all of the channels specified in the eof array callback a function with the signature func(user_arg, handle, error) arg the user_arg for the callback function

Returns returns a SWIG'ized callback handle

Throws throws a FtpControlException if the eofs could not be sent

Exceptions   
ex
  data_write 
data_write (
        self,
        buffer,
        length,
        offset,
        eof,
        callback,
        arg,
        )

Exceptions   
ex
  data_write_stripe 
data_write_stripe (
        self,
        buffer,
        offset,
        eof,
        stripe_ndx,
        callback,
        arg,
        )

Writes data to the specified stripe

args buffer a pyGlobus.util buffer object offset the offset into file that has been written so far eof boolean flag if it is the last data to be written stripe_ndx the stripe which the data is written to. callback a python function that has the signature func(user_arg, handle, error, buffer, length, offset, eof) arg a user supplied arguement to the callback function

Returns returns a SWIG'ized callback handle

Throws throws a FtpControlException if the data could not be written

Exceptions   
ex
  force_close 
force_close (
        self,
        callback,
        arg,
        )

force a close of the control connection without sending a QUIT or waiting for outstanding commands to complete args

callback a Python function that has the signature func(user_arg,handle, error, ftp_response) arg the user_arg to the callback function Returns returns a SWIG'ized callback handle

Throws throws a FtpControlException if the channel could not be closed

Exceptions   
ex
  get_handle 
get_handle ( self )

XXX This handle is only valid as long as this object exists. When the object is destroyed, the memory this handle points to is freed.

  get_pbsz 
get_pbsz ( self )

Return the size of the protection buffer size information

Returns the size of the buffer during protected transfers

Raises a FtpControlException is raised if the pbsz cannot be retrieved

Exceptions   
ex
  get_total_data_channels 
get_total_data_channels ( self,  stripe_ndx )

Returns the number of data channels used so far on this particular stripe args stripe_ndx The stripe that you wish to query

Returns number of channels on that stripe

Throws throws a FtpControlException if the number of channels could not be determined

Exceptions   
ex
  local_dcau 
local_dcau (
        self,
        dcau,
        credential,
        )

Update the ftp handle with the given data channel authentication information args

dcau a Python DCAU

credential a Python GSSCred object

Returns nothing

Raises a FtpControlException is raised if the local_dcau cannot be set

Exceptions   
ex
  local_mode 
local_mode ( self,  mode )

Update the ftp handle with the given mode information args mode a FtpControl Mode type

Returns nothing

Raises a FtpCoontrolException is raised if the local_mode cannot be set

Exceptions   
ex
  local_parallelism 
local_parallelism ( self,  parallelism )

Set the parallelism information in a FTP control handle args parallelism a ftpControl.Parallelism object

Returns nothing

Raises a FtpControlException is raised if the parallelism could not be set

Exceptions   
ex
  local_pasv 
local_pasv ( self,  address )

Exceptions   
ex
  local_pbsz 
local_pbsz ( self,  size )

Update the ftp handle with the given protection buffer size information args

size the size that the buffer will be during a protected transfer

Returns nothing

Raises a FtpControlException is raised if the local_pbsz cannot be set

Exceptions   
ex
  local_port 
local_port ( self,  port )

Exceptions   
ex
  local_send_eof 
local_send_eof ( self,  eof )

Determines if the library will automatically send an EOF message in extended block mode, or if the user will have to explicity do it by calling data_send_eof args eof boolean whether to set the handle to have a local eof

Returns nothing

Throws throws a FtpControlException if the local_eof could not be set

Exceptions   
ex
  local_spas 
local_spas ( self,  address_array )

Create num_addresses local listening socketes, bind them and return the addresses the sockets are listening to

args address_array a Python object that wraps an array of host_port_t objects

Returns the address_array object

Raises a FtpControlException is raised if the local_spas cannot be set

*************************************************************************************************************************************** As of the globus 2.0 final release this function is not implemented, so an unimplemented exception will always be thrown MKR 6/17/02 ***************************************************************************************************************************************

Exceptions   
ex
  local_spor 
local_spor ( self,  address_array )

Insert the host/port addresses returned by a SPAS on the remote host into the local FTP control handle.

args address_array a Python object that wraps an array of host_port_t objects

Returns the address_array object

Raises a FtpControlException is raised if the local_spor cannot be set

*************************************************************************************************************************************** As of the globus 2.0 final release this function calls the globus_ftp_control_local_spas function which is not implemented, so an unimplemented exception will always be thrown MKR 6/17/02 ***************************************************************************************************************************************

Exceptions   
ex
  local_stru 
local_stru ( self,  structure )

Update the handle information on the structure of the data being sent on the data channel

Exceptions   
ex
  local_tcp_buffer 
local_tcp_buffer ( self,  tcp_buffer )

Update the ftp handle with the given socket buffer size information args tcp_buffer a Python TcpBuffer Object

Returns nothing

Raises a FtpCoontrolException is raised if the local_tcp_buffer cannot be set

The TcpBuffer.set_fixed call must be made on the tcp_buffer object before this call is made

Exceptions   
ex
  operation 
operation ( self,  command )

  quit 
quit (
        self,
        callback,
        arg,
        )

send a QUIT to the FTP server and register a response handler args

callback a Python function that has the signature func(user_arg,handle, error, ftp_response) arg the user_arg to the callback function Returns returns a SWIG'ized callback handle

Throws throws a FtpControlException if the QUIT message could not be sent

Exceptions   
ex
  raw_command 
raw_command ( self,  command )

  read_commands 
read_commands (
        self,
        callback,
        arg,
        )

Exceptions   
ex
  release_data_info 
release_data_info ( self,  write_info )

Releases the memory associated with the write_info object Must be called after each create_data_info call

args write_info a SWIG'ized pointer to a write_info object

Throws throws a FtpControlException if the memory to the write_info object cannot be released

Returns nothing

Exceptions   
ex
  send_command 
send_command (
        self,
        cmdspec,
        callback,
        arg,
        )

send a command to the FTP server and register a response handler args cmdspec a string which has the command to be sent to the FTP Server callback a Python function that has the signature func(user_arg,handle, error, ftp_response) arg the user_arg to the callback function

Returns returns a SWIG'ized callback handle

Throws throws a FtpControlException if the command could not be sent

Exceptions   
ex
  send_response 
send_response (
        self,
        resp,
        callback,
        arg,
        )

Exceptions   
ex
  x_data_write_stripe 
x_data_write_stripe (
        self,
        buffer,
        offset,
        eof,
        stripe_ndx,
        write_info,
        )

Writes data to the specified stripe args buffer a pyGlobus.util buffer object offset the offset into file that has been written so far eof boolean flag if it is the last data to be written stripe_ndx the stripe which the data is written to. write_info a SWIG'ized pointer to a write_info object

Returns nothing

Throws throws a FtpControlException if the data could not be written

Exceptions   
ex

Table of Contents

This document was automatically generated on Tue Feb 4 16:47:03 2003 by HappyDoc version 2.1