org.globus.transfer.reliable.service
Class TransferClient

java.lang.Object
  extended byorg.globus.transfer.reliable.service.TransferClient

public class TransferClient
extends Object

Transfer Client


Field Summary
private  int attempts
           
private  org.ietf.jgss.GSSCredential credential
           
private  org.globus.util.GlobusURL destinationGlobusURL
           
private  org.globus.ftp.GridFTPClient destinationHost
           
private  String destinationPath
           
private  String destinationSubjectName
           
private static org.globus.util.I18n i18n
           
private static org.apache.commons.logging.Log logger
           
private  MyMarkerListener markerListener
           
private  int parallelism
           
private  String permissions
           
private  int requestId
           
private  RFTOptionsType rftOptions
           
private  ResourcePropertySet rpSet
           
private  long size
           
private  org.globus.util.GlobusURL sourceGlobusURL
           
private  org.globus.ftp.GridFTPClient sourceHost
           
private  String sourcePath
           
private  String sourceSubjectName
           
private  int status
           
private  int tcpBufferSize
           
private  TotalBytesTransferredResource totalBytes
           
private  ResourceProperty totalBytesTransferredRP
           
private  int transferid
           
private  URLExpander urlExpander
           
private  String userName
           
 
Constructor Summary
TransferClient()
           
 
Method Summary
 void authenticate()
           
private  void authenticateDestination()
           
private  void authenticateSource()
           
 void authorize()
          Sets the authorization attribute of the TransferClient object
private  void authorizeDestination()
           
private  void authorizeSource()
           
 boolean checkForReuse(int requestId, org.globus.util.GlobusURL targetSource, org.globus.util.GlobusURL targetDest)
          Check for reuse of this transferClient
 void close()
          Closes the sockets to source and destination hosts
 void deleteDestination()
           
 org.globus.util.GlobusURL getDestinationURL()
          Gets the destinationURL attribute of the TransferClient object
 int getRequestId()
           
 long getSize()
          Gets the size attribute of the TransferClient object
 org.globus.util.GlobusURL getSourceURL()
          Gets the sourceURL attribute of the TransferClient object
 int getStatus()
          Gets the status attribute of the TransferClient object
 int getTransferID()
          Gets the transferID attribute of the TransferClient object
 URLExpander getUrlExpander()
          Gets the urlExpander attribute of the TransferClient object
 String getUserName()
           
private  boolean isTransientException(Exception e)
           
private  void normalExtendedTransfer()
          Performs the normal extended transfer
private  void normalNonExtendedTransfer()
          Performs normal non-extended transfer
private  void noThirdPartyExtendedTransfer()
          Performs notptExtendedTransfer
private  void noThirdPartyNonExtendedTransfer()
          Performs notpt non-extended transfer
 void setAttempts(int attempts)
           
 void setCredential(org.ietf.jgss.GSSCredential credential)
          Sets the credential to be used for this transfer
 void setDestinationHost(String destURL)
          Sets the destinationHost attribute of the TransferClient object
private  void setDestinationOptions()
           
 void setDestinationPath(String destPath)
          Sets the destinationPath attribute of the TransferClient object
 void setModeE()
           
 void setOptions(RFTOptionsType rftOptions)
           
private  void setPermissions()
           
 void setRequestId(int requestId)
           
 void setResourcePropertySet(ResourcePropertySet rpSet)
           
 void setRestartMarker(String marker)
          Sets the restartMarker attribute of the TransferClient object
 void setRFTOptions()
          Sets the rFTOptions attribute of the TransferClient object
 void setSourceHost(String sourceURL)
          Sets the sourceHost attribute of the TransferClient object
private  void setSourceOptions()
           
 void setSourcePath(String sourcePath)
          Sets the sourcePath attribute of the TransferClient object
 void setStatus(int status)
          Sets the status attribute of the TransferClient object
 void setStriping()
          Enable Striping if the servers support it
 void setTransferId(int transferId)
          Sets the transferId attribute of the TransferClient object
 void setUserName(String userName)
           
 void transfer(boolean useExtended)
          Performs the actual transfer
private  void updatePermissions()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sourceHost

private org.globus.ftp.GridFTPClient sourceHost

destinationHost

private org.globus.ftp.GridFTPClient destinationHost

sourcePath

private String sourcePath

destinationPath

private String destinationPath

status

private int status

transferid

private int transferid

parallelism

private int parallelism

tcpBufferSize

private int tcpBufferSize

credential

private org.ietf.jgss.GSSCredential credential

sourceGlobusURL

private org.globus.util.GlobusURL sourceGlobusURL

destinationGlobusURL

private org.globus.util.GlobusURL destinationGlobusURL

size

private long size

rftOptions

private RFTOptionsType rftOptions

sourceSubjectName

private String sourceSubjectName

destinationSubjectName

private String destinationSubjectName

markerListener

private MyMarkerListener markerListener

urlExpander

private URLExpander urlExpander

logger

private static org.apache.commons.logging.Log logger

i18n

private static org.globus.util.I18n i18n

requestId

private int requestId

rpSet

private ResourcePropertySet rpSet

totalBytesTransferredRP

private ResourceProperty totalBytesTransferredRP

totalBytes

private TotalBytesTransferredResource totalBytes

userName

private String userName

permissions

private String permissions

attempts

private int attempts
Constructor Detail

TransferClient

public TransferClient()
Method Detail

setRequestId

public void setRequestId(int requestId)
Parameters:
requestId -

getRequestId

public int getRequestId()
Returns:
requestId

setUserName

public void setUserName(String userName)
Parameters:
userName -

getUserName

public String getUserName()
Returns:
userName

setAttempts

public void setAttempts(int attempts)
Parameters:
attempts -

setResourcePropertySet

public void setResourcePropertySet(ResourcePropertySet rpSet)
Parameters:
rpSet -

setSourceHost

public void setSourceHost(String sourceURL)
                   throws RftException,
                          RftTransientException,
                          RftDBException
Sets the sourceHost attribute of the TransferClient object

Parameters:
sourceURL - The new sourceHost value
Throws:
RftException
RftTransientException
RftDBException

setDestinationHost

public void setDestinationHost(String destURL)
                        throws RftException,
                               RftTransientException,
                               RftDBException
Sets the destinationHost attribute of the TransferClient object

Parameters:
destURL -
Throws:
RftException
RftTransientException
RftDBException

getSourceURL

public org.globus.util.GlobusURL getSourceURL()
Gets the sourceURL attribute of the TransferClient object

Returns:
The sourceURL value

getDestinationURL

public org.globus.util.GlobusURL getDestinationURL()
Gets the destinationURL attribute of the TransferClient object

Returns:
The destinationURL value

setStatus

public void setStatus(int status)
Sets the status attribute of the TransferClient object

Parameters:
status - The new status value

setCredential

public void setCredential(org.ietf.jgss.GSSCredential credential)
Sets the credential to be used for this transfer


setTransferId

public void setTransferId(int transferId)
Sets the transferId attribute of the TransferClient object

Parameters:
transferId - The new transferId value

getSize

public long getSize()
Gets the size attribute of the TransferClient object

Returns:
The size value

getUrlExpander

public URLExpander getUrlExpander()
Gets the urlExpander attribute of the TransferClient object

Returns:
The urlExpander value

checkForReuse

public boolean checkForReuse(int requestId,
                             org.globus.util.GlobusURL targetSource,
                             org.globus.util.GlobusURL targetDest)
Check for reuse of this transferClient

Parameters:
requestId -
targetSource -
targetDest -
Returns:
true if reusable

authorize

public void authorize()
               throws RftException
Sets the authorization attribute of the TransferClient object

Throws:
RftException

authorizeSource

private void authorizeSource()

authorizeDestination

private void authorizeDestination()

getStatus

public int getStatus()
Gets the status attribute of the TransferClient object

Returns:
The status value

setDestinationPath

public void setDestinationPath(String destPath)
Sets the destinationPath attribute of the TransferClient object

Parameters:
destPath - The new destinationPath value

getTransferID

public int getTransferID()
Gets the transferID attribute of the TransferClient object

Returns:
The transferID value

setSourcePath

public void setSourcePath(String sourcePath)
Sets the sourcePath attribute of the TransferClient object

Parameters:
sourcePath - The new sourcePath value

setOptions

public void setOptions(RFTOptionsType rftOptions)
Parameters:
rftOptions -

setRFTOptions

public void setRFTOptions()
                   throws RftException
Sets the rFTOptions attribute of the TransferClient object

Throws:
RftException

setSourceOptions

private void setSourceOptions()
                       throws org.globus.ftp.exception.ServerException,
                              IOException
Throws:
org.globus.ftp.exception.ServerException
IOException

setDestinationOptions

private void setDestinationOptions()
                            throws org.globus.ftp.exception.ServerException,
                                   IOException
Throws:
org.globus.ftp.exception.ServerException
IOException

authenticate

public void authenticate()
                  throws RftException
Throws:
RftException

authenticateSource

private void authenticateSource()
                         throws RftException
Throws:
RftException

authenticateDestination

private void authenticateDestination()
                              throws RftException
Throws:
RftException

setModeE

public void setModeE()
              throws RftException
Throws:
RftException

setRestartMarker

public void setRestartMarker(String marker)
Sets the restartMarker attribute of the TransferClient object

Parameters:
marker - The new restartMarker value

close

public void close()
Closes the sockets to source and destination hosts


updatePermissions

private void updatePermissions()
                        throws RftException
Throws:
RftException

transfer

public void transfer(boolean useExtended)
              throws RftException,
                     RftTransientException
Performs the actual transfer

Parameters:
useExtended -
Throws:
RftException
RftTransientException

deleteDestination

public void deleteDestination()

setPermissions

private void setPermissions()
                     throws RftException
Throws:
RftException

isTransientException

private boolean isTransientException(Exception e)

setStriping

public void setStriping()
                 throws RftException
Enable Striping if the servers support it

Throws:
IOException
org.globus.ftp.exception.ServerException
RftException

noThirdPartyNonExtendedTransfer

private void noThirdPartyNonExtendedTransfer()
                                      throws RftTransientException
Performs notpt non-extended transfer

Throws:
RftTransientException

noThirdPartyExtendedTransfer

private void noThirdPartyExtendedTransfer()
                                   throws RftTransientException,
                                          RftException
Performs notptExtendedTransfer

Throws:
RftTransientException
RftException

normalExtendedTransfer

private void normalExtendedTransfer()
                             throws RftTransientException
Performs the normal extended transfer

Throws:
RftTransientException

normalNonExtendedTransfer

private void normalNonExtendedTransfer()
                                throws RftTransientException
Performs normal non-extended transfer

Throws:
RftTransientException