org.globus.transfer.reliable.service.cache
Class ThirdPartyConnectionImpl

java.lang.Object
  extended by org.globus.transfer.reliable.service.cache.ThirdPartyConnectionImpl
All Implemented Interfaces:
Connection

public class ThirdPartyConnectionImpl
extends java.lang.Object
implements Connection

Class for a third party connection


Field Summary
protected  java.lang.String connectionId
           
protected  SingleConnectionImpl destination
           
protected  java.lang.String dstCS
           
protected  long lastUsed
           
private static int numberFDs
           
protected  SingleConnectionImpl source
           
protected  java.lang.String srcCS
           
protected  int type
           
protected  java.lang.String userDN
           
 
Constructor Summary
ThirdPartyConnectionImpl(ConnectionParameter params, org.ietf.jgss.GSSCredential credential, java.lang.String sourceSubjectName, java.lang.String destSubjectName)
           
 
Method Summary
 boolean checkConnectionIntegrity()
          Check if 3rd party connection is still alive and ok
 boolean checkForReuse(ConnectionParameter params)
          Check if the existing connection can be reused for another transfer.
 void closeConnection()
          Close the third party connection
 org.globus.ftp.MlsxEntry doMlstOnSource()
           
 java.lang.String getDestinationPath()
           
 long getLastUsed()
           
 int getNumberFDs()
           
 java.lang.String getSourcePath()
           
 int getType()
           
 void normalExtendedTransfer(MyMarkerListener markerListener)
          Perform an extended 3rd party transfer
 void normalNonExtendedTransfer(MyMarkerListener markerListener)
          Perform a non-extended 3rd party transfer
 void setPermissionsOnDestination(java.lang.String permissions)
          Set permissions of files on the destination
 void setRestartMarker(java.lang.String marker)
          Set the restartMarker attribute of the TransferClient object.
 void successfulTransfer()
           
 void updateForReuse(ConnectionParameter params)
           
 void updateLastUsed()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

protected SingleConnectionImpl source

destination

protected SingleConnectionImpl destination

userDN

protected java.lang.String userDN

lastUsed

protected long lastUsed

connectionId

protected java.lang.String connectionId

type

protected int type

numberFDs

private static final int numberFDs
See Also:
Constant Field Values

srcCS

protected java.lang.String srcCS

dstCS

protected java.lang.String dstCS
Constructor Detail

ThirdPartyConnectionImpl

public ThirdPartyConnectionImpl(ConnectionParameter params,
                                org.ietf.jgss.GSSCredential credential,
                                java.lang.String sourceSubjectName,
                                java.lang.String destSubjectName)
                         throws java.io.IOException,
                                org.globus.ftp.exception.ServerException,
                                RftTransientException,
                                RftException
Throws:
java.io.IOException
org.globus.ftp.exception.ServerException
RftTransientException
RftException
Method Detail

successfulTransfer

public void successfulTransfer()
Specified by:
successfulTransfer in interface Connection

setRestartMarker

public void setRestartMarker(java.lang.String marker)
                      throws RftTransientException
Set the restartMarker attribute of the TransferClient object.

Specified by:
setRestartMarker in interface Connection
Parameters:
marker - The new restartMarker value
Throws:
RftTransientException - If setting restart marker on the server fails

closeConnection

public void closeConnection()
Close the third party connection

Specified by:
closeConnection in interface Connection

checkForReuse

public boolean checkForReuse(ConnectionParameter params)
Check if the existing connection can be reused for another transfer. Sanity security check: compare the subjects, just in case the hashCode creation code has problems.

Specified by:
checkForReuse in interface Connection
Parameters:
transferJob -
rftOptions -
Returns:
true in case the connection can be reused

checkConnectionIntegrity

public boolean checkConnectionIntegrity()
Check if 3rd party connection is still alive and ok

Specified by:
checkConnectionIntegrity in interface Connection
Returns:
true if the connection is ok

updateForReuse

public void updateForReuse(ConnectionParameter params)
Specified by:
updateForReuse in interface Connection

normalExtendedTransfer

public void normalExtendedTransfer(MyMarkerListener markerListener)
                            throws RftTransientException
Perform an extended 3rd party transfer

Throws:
RftTransientException

normalNonExtendedTransfer

public void normalNonExtendedTransfer(MyMarkerListener markerListener)
                               throws RftTransientException
Perform a non-extended 3rd party transfer

Throws:
RftTransientException

doMlstOnSource

public org.globus.ftp.MlsxEntry doMlstOnSource()
                                        throws RftException,
                                               RftTransientException
Returns:
Throws:
RftException - If the file/dir doesn't exist
RftTransientException - If the mlst call fails on an existing

setPermissionsOnDestination

public void setPermissionsOnDestination(java.lang.String permissions)
                                 throws RftException,
                                        RftTransientException
Set permissions of files on the destination

Parameters:
permissions -
Throws:
RftException - If the permissions are null
RftTransientException - If setting permissions fails

getType

public int getType()
Specified by:
getType in interface Connection

getNumberFDs

public int getNumberFDs()
Specified by:
getNumberFDs in interface Connection

getLastUsed

public long getLastUsed()
Specified by:
getLastUsed in interface Connection

getSourcePath

public java.lang.String getSourcePath()

getDestinationPath

public java.lang.String getDestinationPath()

updateLastUsed

public void updateLastUsed()
Specified by:
updateLastUsed in interface Connection