Class MultiTransferHandler<T>
- java.lang.Object
-
- java.util.Observable
-
- unlimited.fc.client.api.TransferHook
-
- unlimited.fc.client.transferhandler.MultiTransferHandler<T>
-
- All Implemented Interfaces:
java.lang.AutoCloseable,java.lang.Runnable,unlimited.core.transfers.UDPTransferMetrics,unlimited.core.util.common.CancelHandler,PostURLTransfer.TransferHolder,TransferState,FilesMatchHandler
- Direct Known Subclasses:
FileCatalystReceiveHandler,FileCatalystTransmitHandler,ServerToServerHandler
public abstract class MultiTransferHandler<T> extends TransferHook implements java.lang.Runnable, FilesMatchHandler, PostURLTransfer.TransferHolder, java.lang.AutoCloseable
Title: Digital Fountain Encoder/Decoder
Description:
Copyright: Copyright (c) 2004
Company: Unlimi-Tech Software Inc.
-
-
Field Summary
Fields Modifier and Type Field Description protected intcountTransferredprotected FileCatalystFileFilterfilterprotected booleanisParentPooledprotected longlastBytesSoFarprotected java.lang.StringstatusMessagestatic longwaitForDiscWriteProgressiveprotected booleanwillTransfer-
Fields inherited from class unlimited.fc.client.api.TransferHook
BIDIRECTIONAL, CANCELLED, CHECKING, COMPRESSING, CREATINGDMG, currentFileToIDs, DECOMPRESSING, DELTA, DOINGCHMOD, DOINGMDTM, DONEFILE, DOWNLOAD, ERROR, errorMessageStack, FINISHED, IDLE, INITIALIZING, MONITORING, MOVINGFILES, NOTATTEMPTED, PROCESSING, REBUILD, RECONNECTING, SIGNATURE, SUCCESS, TRANSFERRING, UPLOAD, VERIFYING
-
-
Constructor Summary
Constructors Constructor Description MultiTransferHandler(FCClientEngine fcClient)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddObserver(java.util.Observer o)Java has Deprecated Observable due to it being an anti-pattern.voidaddTransferredLocalFile(java.lang.String filename)voidaddTransferredRemoteFile(java.lang.String filename)protected intcalculateAverageKbpsRate(long bytesTotal, long msTotal)Calculate a transfer rate in kilo bits per second Kilo here means a 1000, because this is a rate.intcalculateEffectiveRateOfZipTransfer(long sizeOfAllFilesZipped, long timeForEffectiveRate)booleancheckForServerTimeout()booleancheckRegex(java.lang.String filename)voidclose()protected voiddeleteLocalFiles(java.util.LinkedList<java.nio.file.Path> tmpFileList)Attempts to delete all files marked in temp file list locally.protected voiddeleteRemoteFileNames(java.util.LinkedList<java.lang.String> tmpFileList)Attempts to delete all remote files marked in temp file list.protected abstract booleandoesDirectoryContainContents(T t)protected voiddowngradeFileTransferMode()protected voidenableVerifySizeIfNeeded()protected booleanfileRegionMatch(java.nio.file.Path file, java.lang.String rFile, long offset, long length)protected MD5ResultfilesMatch(java.nio.file.Path file, java.lang.String rFile)protected MD5ResultfilesMatch(java.nio.file.Path file, java.lang.String rFile, boolean invalidateRemoteMD5CacheEntry)static MD5ResultfilesMatch(java.nio.file.Path file, java.lang.String rFile, boolean invalidateRemoteMD5CacheEntry, FilesMatchHandler filesMatchHandler)protected voidfilesMatchBackground(java.nio.file.Path file, java.lang.String rFile)protected MD5ResultfilesMatchPartial(java.nio.file.Path file, java.lang.String rFile, long checkInterval, long checkLength)static MD5ResultfilesMatchPartial(java.nio.file.Path file, java.lang.String rFile, long checkInterval, long checkLength, boolean invalidateRemoteMD5CacheEntry, FilesMatchHandler filesMatchHandler)protected voidfilterEmptyDirectoriesIfNeeded()intgetActiveIndex()java.util.Map<java.lang.String,java.lang.Long>getAllFileAndSize()java.util.List<java.lang.String>getAllFilePaths()Returns a list of all file paths contained within this TransferHooklonggetAverageSetupTeardown()longgetAvgMD5TimePerKB()longgetBytesSoFarAllFiles()Returns the number of bytes transferred so far for all files.longgetBytesSoFarAllFilesFull()Return the full size of the files which were transferred.longgetBytesSoFarCurrentFile()Returns the number of bytes transferred so far for the current file.FileCatalystClientCallbackHandlergetCallbackHandler()unlimited.core.util.common.CancelHandlergetCancelHandler()FCClientEnginegetClient()FCClientgetClientAPI()java.lang.StringgetCompFileFilter()intgetCompressionLevel()intgetCompressionMethod()intgetCompressionStrategy()intgetCountTransferred()Returns the number of files that were actually transferred.intgetCurrentEffectiveRate()Returns the rate for the current file in Kbps.java.lang.StringgetCurrentFilename()Returns the name of the file currently being transferred.longgetCurrentFileTime()longgetCurrentFileTransferTime()Returns the transfer time for the current file in millisecondsintgetCurrentPercent()Returns the percent complete for the current fileintgetCurrentRate()Returns the rate in the last second for the current file in Kbps.static java.lang.StringgetDeltaFilename(java.lang.String originalFilename, java.lang.String uniqueID)Returns the delta filename used when caculating deltas during a transfer.intgetDirection()Returns either UPLOAD or DOWNLOAD constant depending on the direction of this transferintgetEffectiveRateAverage()Returns the effective rate for the current file in Kbps as an average over last 30 seconds.intgetEffectiveRateAverageInKBperSecond()intgetFilesSoFar()Returns the number of files transferred so far.java.util.List<java.lang.String>getFilesTransferredLocal()Returns a List containing the full local paths (Strings) of all files that were transferred.java.util.List<java.lang.String>getFilesTransferredRemote()Returns a List containing the full remote paths (Strings) of all files that were transferred.FileCatalystFileFiltergetFilter()java.lang.StringgetFormattedCurrentFileTransferTime()Returns a human readable file transfer timejava.lang.StringgetFormattedOverallTransferTime()Returns the time taken to transfer all files formatted to a String i.e 5 mins 21 secsjava.lang.StringgetFormattedTransferTime()Returns the time taken to transfer the current file formatted to a String i.e 5 mins 21 secsintgetIncTransferOption()longgetLastTry()java.lang.StringgetLocalFilename()Returns the full path of the local file currently being transferredprotected CachedFileIndexInterfacegetLocalFileTransferIndex()java.nio.file.PathgetLocalWorkingDirectory()unlimited.core.util.common.logs.LogUtilsgetLogFiles()static longgetMaximumDeltaSize(long sourceFileSize, long destFileSize)intgetMaxTries()static java.lang.StringgetMD5Key(java.nio.file.Path file)intgetMd5RateLimit()intgetMeanEffectiveRate()Returns the rate for the current file in Kbps.static longgetMinimumDeltaSize(long sourceFileSize, long destFileSize)intgetOverallRate()Returns the average rate (in Kbps) spanned over all files averaged over the entire transfer.doublegetOverallRateInKBperSecond()Returns the average rate (in KB/s) spanned over all files averageed over the entire transfer.java.lang.StringgetOverallTimeRemaining()Return the time remaining for the all files formatted to a String i.e 5 mins 21 secslonggetOverallTimeRemainingMillis()Returns the time remaining in milliseconds for all fileslonggetOverallTransferTime()Returns the time taken to transfer all files so far in millisecondsdoublegetPacketLossPercent()Returns the packet loss percent for the current transfer.intgetPercent()Returns the percentage complete of all files to be transferredjava.lang.StringgetPostURL()static java.lang.StringgetPreservePathStructureFileName(java.lang.String lFile)intgetProgressiveTimeout()java.lang.StringgetProgressiveTimeoutFilter()intgetRateAverage()Returns the network rate for the current file in Kbps as an average over last 30 seconds.doublegetRateAverageInKBperSecond()Returns the rate for the current file in KB/s as an average over last 30 secondsdoublegetRateInKBperSecond()Returns the rate for the current file in KB/sjava.lang.StringgetRegex()java.lang.StringgetRemoteFilename()Returns the full path of the remote file currently being transferredjava.lang.StringgetRemoteWorkingDirectory()longgetRetransferHeaderSize()intgetRoundTripTime()Returns the current round trip timestatic java.lang.StringgetSignatureFilename(java.lang.String originalFilename, java.lang.String uniqueID)Returns the delta filename used when caculating signatures during a transfer.longgetSizeAllFiles()Returns the total size in bytes of all files that will be transferredlonggetSizeCurrentFile()Returns the size in bytes of the file currently being transferred.longgetSizeTransferredAlreadyAllFiles()Size of files which are already found on the destination, if incremental is on and file was skipped or if file transfer was resumed where 2 GB of data was there and you are continuing last 2GB of data.longgetSizeTransferredAlreadyCurrentFile()Returns the number of bytes that were already transferred for this file (usually due to a resume)java.lang.IntegergetStatus(int index)intgetStatusCode()Returns the current status code, indicates what is currently happening with the transferjava.lang.StringgetStatusMessage()Returns a String representation of the current status of this transfer handler.java.lang.StringgetTimeRemaining()Return the time remaining for the current file formatted to a String i.e 5 mins 21 secslonggetTimeRemainingMillis()Returns the time remaining in milliseconds for the current fileintgetTmpMode()intgetTotalFiles()Returns the total number of files to be transferred.unlimited.core.transfers.UDPTransferMetricsContainergetTransferMetrics()Returns transfer metric container specific to UDP transfers.intgetTransferMode()Returns the current transfer modelonggetTransferStartTime()Returns the transfer start time for the total transfer in millisecondsjava.util.List<java.lang.Integer>getTransferStatus()Returns a list of all the status codes for current transfers within this TransferHooklonggetTransferTime()Returns the transfer time for the total transfer in millisecondsjava.lang.StringgetTransferWarningMessage()Returns the transfer warning message if a transfer warning has occurred.java.lang.StringgetUniqueID()intgetVerifyMode()longgetWaitRetry()longgetZipFileSizeLimit()voidhandleError(java.lang.String postURL, java.lang.Exception e)voidhandleProgressiveDelayBeforeAppend()protected voidincrementSofarAllFiles(boolean isADeltaTransfer, long dataSize)protected voidincrementTotalFiles()protected voidinitializeProgressiveDelay()protected voidinitializeTransferHeadersEachAppend()booleanisAddSkippedFilesToTransferVector()booleanisAutoResume()booleanisAutoUnzip()booleanisAutoZip()booleanisCancelled()booleanisCancelledDueToError()booleanisDeleteAfterTransfer()booleanisDeletePartial()booleanisDowngradeModeOnReConnect()booleanisFatal()Return true if a fatal error occurredbooleanisIncremental()booleanisIncrementalSizeCheckOnly()booleanisOptimizeBlocksize()booleanisPreservePathStructure()booleanisProgressiveTransfers()booleanisRenameExtensions()booleanisSecure()Returns true if transfer is securebooleanisStorTmp()booleanisTransferCancelled()Returns true if the transfer was cancelled.booleanisTransferComplete()Returns true if all files are successfully transferredbooleanisTransferEmptyDirectories()booleanisTransferError()Returns true if an error occuredprotected booleanisTransferUsingDeltas()booleanisTransferWarning()Returns true a recoverable transfer warning has occured.booleanisUseCompression()booleanisValidFileCache()voidkillAll()voidlogFinalTransferStats(java.nio.file.Path file)voidlogMessage(java.util.logging.Level info, java.lang.String string)static voidmain(java.lang.String[] args)voidnotifyObservers()voidnotifyObservers(java.lang.Object arg)protected booleanpassesProgressiveTimeoutFilter(java.lang.String sourceFile)protected booleanpermissionsAllowForDeltasTransfer()Check to see if the permissions on teh server are OK for doing DeltasvoidremoveIndex(int index)protected voidrenameExtension(java.nio.file.Path file, java.lang.String rFile)OTIS feature, rename the extensions on the local and remote files from RDY to PKDvoidrun()abstract voidrunHandler()voidsetAddSkippedFilesToTransferVector(boolean addSkippedFilesToTransferVector)voidsetAppletTransferCache(java.util.HashMap<java.lang.String,java.lang.Long> transferCache)voidsetAutoResume(boolean autoResume)voidsetAutoUnzip(boolean b)voidsetAutoZip(boolean b)voidsetAvgMD5TimePerKB(long avgMD5TimePerKB)voidsetAvgRTT(long avgRTT)voidsetBandwidth(int bandwidth)voidsetCallbackHandler(FileCatalystClientCallbackHandler callbackHandler)voidsetCancelled()Calling this method will cancel the current transfer.protected voidsetCancelled(boolean isCancelled)voidsetClientAPI(FCClient clientAPI)voidsetCompFileFilter(java.lang.String compFileFilter)voidsetCompressionLevel(int compLevel)voidsetCompressionMethod(int compMethod)voidsetCompressionStrategy(int cs)voidsetDeleteAfterTransfer(boolean deleteAfterTransfer)voidsetDeletePartial(boolean deletePartial)voidsetDowngradeModeOnReConnect(boolean downgradeModeOnReConnect)voidsetFatal(boolean fatal)Marks transfer as having failed in a fatal way, no retry at this pointvoidsetFilesSoFar(int num)voidsetFilter(FileCatalystFileFilter filter)voidsetIncremental(boolean incremental)voidsetIncrementalSizeCheckOnly(boolean incrementalSizeCheckOnly)voidsetIncTransferOption(int incTransferOption)voidsetIsError(boolean isError)protected voidsetLastTry()protected voidsetLocalFileTransferIndex(CachedFileIndexInterface localFileTransferIndex)voidsetLocalMD5(java.lang.String localMD5)voidsetLocalWorkingDirectory(java.lang.String localWorkingDirectory)Deprecated.voidsetLocalWorkingDirectory(java.nio.file.Path localWorkingDirectory)voidsetLogFiles(unlimited.core.util.common.logs.LogUtils logFiles)voidsetMaxTries(int maxTries)voidsetMd5RateLimit(int md5RateLimit)voidsetOptimizeBlocksize(boolean optimizeBlocksize)voidsetParentPooled(boolean pooled)voidsetPostURL(java.lang.String postURL)voidsetPreservePathStructure(boolean preservePathStructure)voidsetProgressiveTimeout(int i)voidsetProgressiveTimeoutFilter(java.lang.String i)voidsetProgressiveTransfers(boolean progressiveTransfers)voidsetRegex(java.lang.String regex)voidsetRemoteMD5(java.lang.String remoteMD5)voidsetRemoteWorkingDirectory(java.lang.String remoteWorkingDirectory)voidsetRenameExtensions(boolean renameExtensions)voidsetRetransferHeaderSize(long retransferHeaderSize)voidsetSizeCurrentFile(long sizeCurrentFile)protected voidsetStatusCode(int code)voidsetStorTmp(boolean storTmp)voidsetTmpMode(int tmpMode)voidsetTransferEmptyDirectories(boolean transferEmptyDirectories)voidsetTransferMode(int transferMode)voidsetUniqueID(java.lang.String uniqueID)voidsetUseCompression(boolean useCompression)voidsetVerifyMode(int verifyMode)voidsetWaitRetry(long waitRetry)voidsetZipFileSizeLimit(long zipFileSizeLimit)booleanshouldCompressFile(java.nio.file.Path f)static booleanshouldPerformIncremental(long sourceFileSize, long destFileSize)voidupdateObservers()protected voidupdateSofarAllFiles()protected voidupdateStatusTransferring()intvalidateVerifyMode(int verifyMode)booleanverifierRunning()protected voidverifyFileContents(java.nio.file.Path file, java.lang.String rfile, boolean invalidateRemoteCache)protected voidverifySize(java.nio.file.Path file, java.lang.String rFile)static voidwaitForDiscWriteProgressives(MultiTransferHandler<?> handler)booleanwillTransfer()-
Methods inherited from class unlimited.fc.client.api.TransferHook
addErrorMessage, getActualRate, getAllErrorMessages, getCurrentFileToIDs, getErrorCodes, getErrorMessage, getErrorSet, getRate, getSnapShot, getStatusAsParsableString, setFormatter
-
Methods inherited from class java.util.Observable
clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, setChanged
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface unlimited.fc.client.transferhandler.FilesMatchHandler
addErrorMessage
-
-
-
-
Field Detail
-
willTransfer
protected boolean willTransfer
-
waitForDiscWriteProgressive
public static long waitForDiscWriteProgressive
-
statusMessage
protected java.lang.String statusMessage
-
countTransferred
protected int countTransferred
-
filter
protected FileCatalystFileFilter filter
-
lastBytesSoFar
protected long lastBytesSoFar
-
isParentPooled
protected boolean isParentPooled
-
-
Constructor Detail
-
MultiTransferHandler
public MultiTransferHandler(FCClientEngine fcClient)
-
-
Method Detail
-
willTransfer
public boolean willTransfer()
-
runHandler
public abstract void runHandler()
-
setCancelled
protected void setCancelled(boolean isCancelled)
-
setIsError
public void setIsError(boolean isError)
- Specified by:
setIsErrorin interfaceFilesMatchHandler
-
setStatusCode
protected void setStatusCode(int code)
-
getLastTry
public long getLastTry()
-
setLastTry
protected void setLastTry()
-
isFatal
public boolean isFatal()
Return true if a fatal error occurred- Overrides:
isFatalin classTransferHook- Returns:
- true if fatal error occurred
-
setFatal
public void setFatal(boolean fatal)
Marks transfer as having failed in a fatal way, no retry at this point- Parameters:
fatal-
-
addObserver
public void addObserver(java.util.Observer o)
Description copied from class:TransferHookJava has Deprecated Observable due to it being an anti-pattern.- Overrides:
addObserverin classTransferHook
-
notifyObservers
public void notifyObservers()
- Overrides:
notifyObserversin classjava.util.Observable
-
notifyObservers
public void notifyObservers(java.lang.Object arg)
- Overrides:
notifyObserversin classjava.util.Observable
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable
-
close
public void close() throws java.lang.Exception- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.lang.Exception
-
isValidFileCache
public boolean isValidFileCache()
-
getLocalFileTransferIndex
protected CachedFileIndexInterface getLocalFileTransferIndex()
-
setLocalFileTransferIndex
protected void setLocalFileTransferIndex(CachedFileIndexInterface localFileTransferIndex)
-
shouldCompressFile
public boolean shouldCompressFile(java.nio.file.Path f)
-
getAverageSetupTeardown
public long getAverageSetupTeardown()
-
isDeleteAfterTransfer
public boolean isDeleteAfterTransfer()
-
setDeleteAfterTransfer
public void setDeleteAfterTransfer(boolean deleteAfterTransfer)
-
getFilesTransferredRemote
public java.util.List<java.lang.String> getFilesTransferredRemote()
Description copied from interface:TransferStateReturns a List containing the full remote paths (Strings) of all files that were transferred. Calling this method through JavaScript to the applet will return a String delimited by the default delimiter, or whatever delimiter was specified via the applet "delimiter" param- Specified by:
getFilesTransferredRemotein interfaceTransferState- Overrides:
getFilesTransferredRemotein classTransferHook- Returns:
- List containing the full remote paths (Strings) of all files that were transferred.
-
getFilesTransferredLocal
public java.util.List<java.lang.String> getFilesTransferredLocal()
Description copied from interface:TransferStateReturns a List containing the full local paths (Strings) of all files that were transferred. Calling this method through JavaScript to the applet will return a String delimited by the default delimiter, or whatever delimiter was specified via the applet "delimiter" param- Specified by:
getFilesTransferredLocalin interfaceTransferState- Overrides:
getFilesTransferredLocalin classTransferHook- Returns:
- List containing the full local paths (Strings) of all files that were transferred.
-
getTransferStatus
public java.util.List<java.lang.Integer> getTransferStatus()
Description copied from interface:TransferStateReturns a list of all the status codes for current transfers within this TransferHook- Specified by:
getTransferStatusin interfaceTransferState- Overrides:
getTransferStatusin classTransferHook- Returns:
-
getStatus
public java.lang.Integer getStatus(int index)
-
getAllFilePaths
public java.util.List<java.lang.String> getAllFilePaths()
Description copied from interface:TransferStateReturns a list of all file paths contained within this TransferHook- Specified by:
getAllFilePathsin interfaceTransferState- Overrides:
getAllFilePathsin classTransferHook- Returns:
-
getAllFileAndSize
public java.util.Map<java.lang.String,java.lang.Long> getAllFileAndSize()
-
setCancelled
public void setCancelled()
Description copied from interface:TransferStateCalling this method will cancel the current transfer. This method will block until the transfer is actually cancelled.- Specified by:
setCancelledin interfaceTransferState- Overrides:
setCancelledin classTransferHook
-
getTotalFiles
public final int getTotalFiles()
Description copied from interface:TransferStateReturns the total number of files to be transferred.- Specified by:
getTotalFilesin interfaceTransferState- Overrides:
getTotalFilesin classTransferHook- Returns:
- the total number of files to be transferred.
-
incrementTotalFiles
protected final void incrementTotalFiles()
-
getFilesSoFar
public int getFilesSoFar()
Description copied from interface:TransferStateReturns the number of files transferred so far. This includes files that were skipped because incremental is enabled and the file has not been changed.- Specified by:
getFilesSoFarin interfaceTransferState- Overrides:
getFilesSoFarin classTransferHook- Returns:
- the number of files transferred so far.
-
setFilesSoFar
public void setFilesSoFar(int num)
-
updateSofarAllFiles
protected final void updateSofarAllFiles()
-
getStatusMessage
public java.lang.String getStatusMessage()
Description copied from interface:TransferStateReturns a String representation of the current status of this transfer handler.- Specified by:
getStatusMessagein interfaceTransferState- Overrides:
getStatusMessagein classTransferHook- Returns:
- A String representation of the current status of this transfer handler.
-
getBytesSoFarCurrentFile
public long getBytesSoFarCurrentFile()
Description copied from interface:TransferStateReturns the number of bytes transferred so far for the current file.- Specified by:
getBytesSoFarCurrentFilein interfaceTransferState- Overrides:
getBytesSoFarCurrentFilein classTransferHook- Returns:
- the number of bytes transferred so far for the current file (excluding data skipped due to resume).
-
getSizeCurrentFile
public long getSizeCurrentFile()
Description copied from interface:TransferStateReturns the size in bytes of the file currently being transferred.- Specified by:
getSizeCurrentFilein interfaceTransferState- Overrides:
getSizeCurrentFilein classTransferHook- Returns:
- the size in bytes of the file currently being transferred.
-
getSizeAllFiles
public long getSizeAllFiles()
Description copied from interface:TransferStateReturns the total size in bytes of all files that will be transferred- Specified by:
getSizeAllFilesin interfaceTransferState- Overrides:
getSizeAllFilesin classTransferHook- Returns:
- the total size in bytes of all files that will be transferred
-
getBytesSoFarAllFilesFull
public long getBytesSoFarAllFilesFull()
Return the full size of the files which were transferred. Do not include delta/signature/compression size. Include partial transfer size if cancel/pause/error has stopped the transfer. BugZilla #442- Returns:
-
getBytesSoFarAllFiles
public long getBytesSoFarAllFiles()
Description copied from interface:TransferStateReturns the number of bytes transferred so far for all files.- Specified by:
getBytesSoFarAllFilesin interfaceTransferState- Overrides:
getBytesSoFarAllFilesin classTransferHook- Returns:
- the number of bytes transferred so far for all files (excluding data skipped due to resume).
-
getPercent
public int getPercent()
Description copied from interface:TransferStateReturns the percentage complete of all files to be transferred- Specified by:
getPercentin interfaceTransferState- Overrides:
getPercentin classTransferHook- Returns:
- the percentage complete of all files to be transferred
-
getCurrentPercent
public int getCurrentPercent()
Description copied from interface:TransferStateReturns the percent complete for the current file- Specified by:
getCurrentPercentin interfaceTransferState- Overrides:
getCurrentPercentin classTransferHook- Returns:
- the percent complete for the current file
-
getOverallRate
public int getOverallRate()
Description copied from interface:TransferStateReturns the average rate (in Kbps) spanned over all files averaged over the entire transfer.- Specified by:
getOverallRatein interfaceTransferState- Overrides:
getOverallRatein classTransferHook- Returns:
- rate in Kbps
-
getCurrentEffectiveRate
public int getCurrentEffectiveRate()
Description copied from interface:TransferStateReturns the rate for the current file in Kbps. This is the current rate for the current file.- Specified by:
getCurrentEffectiveRatein interfaceTransferState- Overrides:
getCurrentEffectiveRatein classTransferHook- Returns:
- the rate for the current file in Kbps
-
getMeanEffectiveRate
public int getMeanEffectiveRate()
Description copied from interface:TransferStateReturns the rate for the current file in Kbps. This is the average rate for the current file.- Specified by:
getMeanEffectiveRatein interfaceTransferState- Overrides:
getMeanEffectiveRatein classTransferHook- Returns:
- the rate for the current file in Kbps
-
getRateInKBperSecond
public double getRateInKBperSecond()
Description copied from interface:TransferStateReturns the rate for the current file in KB/s- Specified by:
getRateInKBperSecondin interfaceTransferState- Overrides:
getRateInKBperSecondin classTransferHook- Returns:
- the rate for the current file in KB/s
-
getRateAverage
public int getRateAverage()
Description copied from interface:TransferStateReturns the network rate for the current file in Kbps as an average over last 30 seconds.- Specified by:
getRateAveragein interfaceTransferState- Overrides:
getRateAveragein classTransferHook- Returns:
- the rate for the current file in Kbps
-
getEffectiveRateAverage
public int getEffectiveRateAverage()
Description copied from interface:TransferStateReturns the effective rate for the current file in Kbps as an average over last 30 seconds.- Specified by:
getEffectiveRateAveragein interfaceTransferState- Overrides:
getEffectiveRateAveragein classTransferHook- Returns:
- the effective rate for the current file in Kbps
-
getCurrentRate
public int getCurrentRate()
Description copied from interface:TransferStateReturns the rate in the last second for the current file in Kbps.- Specified by:
getCurrentRatein interfaceTransferState- Overrides:
getCurrentRatein classTransferHook- Returns:
- the rate for the current file in Kbps over the past second.
-
getRateAverageInKBperSecond
public double getRateAverageInKBperSecond()
Description copied from interface:TransferStateReturns the rate for the current file in KB/s as an average over last 30 seconds- Specified by:
getRateAverageInKBperSecondin interfaceTransferState- Overrides:
getRateAverageInKBperSecondin classTransferHook- Returns:
- the rate for the current file in KB/s
-
getEffectiveRateAverageInKBperSecond
public int getEffectiveRateAverageInKBperSecond()
-
getOverallRateInKBperSecond
public double getOverallRateInKBperSecond()
Description copied from interface:TransferStateReturns the average rate (in KB/s) spanned over all files averageed over the entire transfer.- Specified by:
getOverallRateInKBperSecondin interfaceTransferState- Overrides:
getOverallRateInKBperSecondin classTransferHook- Returns:
- rate in KB/s
-
getTimeRemainingMillis
public long getTimeRemainingMillis()
Description copied from interface:TransferStateReturns the time remaining in milliseconds for the current file- Specified by:
getTimeRemainingMillisin interfaceTransferState- Overrides:
getTimeRemainingMillisin classTransferHook- Returns:
- the time remaining in milliseconds for the current file
-
getOverallTimeRemainingMillis
public long getOverallTimeRemainingMillis()
Description copied from interface:TransferStateReturns the time remaining in milliseconds for all files- Specified by:
getOverallTimeRemainingMillisin interfaceTransferState- Overrides:
getOverallTimeRemainingMillisin classTransferHook- Returns:
- the time remaining in milliseconds for all files
-
getTimeRemaining
public java.lang.String getTimeRemaining()
Description copied from interface:TransferStateReturn the time remaining for the current file formatted to a String i.e 5 mins 21 secs- Specified by:
getTimeRemainingin interfaceTransferState- Overrides:
getTimeRemainingin classTransferHook- Returns:
- the time remaining for the current file formatted to a String
-
getOverallTimeRemaining
public java.lang.String getOverallTimeRemaining()
Description copied from interface:TransferStateReturn the time remaining for the all files formatted to a String i.e 5 mins 21 secs- Specified by:
getOverallTimeRemainingin interfaceTransferState- Overrides:
getOverallTimeRemainingin classTransferHook- Returns:
- the time remaining for the all files formatted to a String
-
getTransferMetrics
public unlimited.core.transfers.UDPTransferMetricsContainer getTransferMetrics()
Returns transfer metric container specific to UDP transfers. Statistics gathered by UDPTransmitter and UDPReceiver, and passed down the food chain by the ClientEngine -> TransferHook (Receive/Transmit Handler) -> Upload/Download Transfer classes If nothing is transferring, an empty container is passed through with stats values set to zero.- Specified by:
getTransferMetricsin interfaceunlimited.core.transfers.UDPTransferMetrics- Overrides:
getTransferMetricsin classTransferHook- Returns:
- UDPTransferMetricsContainer
-
updateObservers
public void updateObservers()
-
getOverallTransferTime
public long getOverallTransferTime()
Description copied from interface:TransferStateReturns the time taken to transfer all files so far in milliseconds- Specified by:
getOverallTransferTimein interfaceTransferState- Overrides:
getOverallTransferTimein classTransferHook- Returns:
- the time taken to transfer all files so far in milliseconds
-
getFormattedOverallTransferTime
public java.lang.String getFormattedOverallTransferTime()
Description copied from interface:TransferStateReturns the time taken to transfer all files formatted to a String i.e 5 mins 21 secs- Specified by:
getFormattedOverallTransferTimein interfaceTransferState- Overrides:
getFormattedOverallTransferTimein classTransferHook- Returns:
- the time taken to transfer all files formatted to a String i.e 5 mins 21 secs
-
getFormattedCurrentFileTransferTime
public java.lang.String getFormattedCurrentFileTransferTime()
Description copied from interface:TransferStateReturns a human readable file transfer time- Specified by:
getFormattedCurrentFileTransferTimein interfaceTransferState- Overrides:
getFormattedCurrentFileTransferTimein classTransferHook- Returns:
- Human readable transfer time
-
getFormattedTransferTime
public java.lang.String getFormattedTransferTime()
Description copied from interface:TransferStateReturns the time taken to transfer the current file formatted to a String i.e 5 mins 21 secs- Specified by:
getFormattedTransferTimein interfaceTransferState- Overrides:
getFormattedTransferTimein classTransferHook- Returns:
- the time taken to transfer the current file formatted to a String i.e 5 mins 21 secs
-
isTransferComplete
public boolean isTransferComplete()
Description copied from interface:TransferStateReturns true if all files are successfully transferred- Specified by:
isTransferCompletein interfaceTransferState- Specified by:
isTransferCompletein classTransferHook- Returns:
- true if all files are successfully transferred
-
isTransferCancelled
public boolean isTransferCancelled()
Description copied from interface:TransferStateReturns true if the transfer was cancelled.- Specified by:
isTransferCancelledin interfaceTransferState- Specified by:
isTransferCancelledin classTransferHook- Returns:
- true if the transfer was cancelled.
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelledin interfaceunlimited.core.util.common.CancelHandler
-
isCancelledDueToError
public boolean isCancelledDueToError()
- Specified by:
isCancelledDueToErrorin interfaceunlimited.core.util.common.CancelHandler
-
isTransferError
public final boolean isTransferError()
Description copied from interface:TransferStateReturns true if an error occured- Specified by:
isTransferErrorin interfaceFilesMatchHandler- Specified by:
isTransferErrorin interfaceTransferState- Specified by:
isTransferErrorin classTransferHook- Returns:
- true if an error occured
-
isTransferWarning
public boolean isTransferWarning()
Description copied from interface:TransferStateReturns true a recoverable transfer warning has occured.- Specified by:
isTransferWarningin interfaceTransferState- Overrides:
isTransferWarningin classTransferHook- Returns:
- boolean true if a recoverable transfer warning has occured.
-
getTransferWarningMessage
public java.lang.String getTransferWarningMessage()
Description copied from interface:TransferStateReturns the transfer warning message if a transfer warning has occurred.- Specified by:
getTransferWarningMessagein interfaceTransferState- Overrides:
getTransferWarningMessagein classTransferHook- Returns:
- String the warning message
-
getStatusCode
public int getStatusCode()
Description copied from interface:TransferStateReturns the current status code, indicates what is currently happening with the transfer- Specified by:
getStatusCodein interfaceTransferState- Overrides:
getStatusCodein classTransferHook- Returns:
- the current status code
-
getCurrentFilename
public java.lang.String getCurrentFilename()
Description copied from interface:TransferStateReturns the name of the file currently being transferred.- Specified by:
getCurrentFilenamein interfaceTransferState- Overrides:
getCurrentFilenamein classTransferHook- Returns:
- the name of the file currently being transferred.
-
getTransferTime
public long getTransferTime()
Description copied from interface:TransferStateReturns the transfer time for the total transfer in milliseconds- Specified by:
getTransferTimein interfaceTransferState- Overrides:
getTransferTimein classTransferHook- Returns:
- the transfer time for the total transfer in milliseconds
-
getTransferStartTime
public long getTransferStartTime()
Description copied from interface:TransferStateReturns the transfer start time for the total transfer in milliseconds- Specified by:
getTransferStartTimein interfaceTransferState- Overrides:
getTransferStartTimein classTransferHook- Returns:
- the transfer start time for the total transfer in milliseconds
-
getLogFiles
public unlimited.core.util.common.logs.LogUtils getLogFiles()
-
setLogFiles
public void setLogFiles(unlimited.core.util.common.logs.LogUtils logFiles)
-
setAutoZip
public void setAutoZip(boolean b)
-
isAutoZip
public boolean isAutoZip()
-
isOptimizeBlocksize
public boolean isOptimizeBlocksize()
-
setOptimizeBlocksize
public void setOptimizeBlocksize(boolean optimizeBlocksize)
-
downgradeFileTransferMode
protected void downgradeFileTransferMode()
-
renameExtension
protected void renameExtension(java.nio.file.Path file, java.lang.String rFile) throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionOTIS feature, rename the extensions on the local and remote files from RDY to PKD- Parameters:
file-rFile-- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
filesMatchBackground
protected void filesMatchBackground(java.nio.file.Path file, java.lang.String rFile) throws unlimited.core.util.common.exception.FCException, java.io.IOException- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
filesMatch
protected MD5Result filesMatch(java.nio.file.Path file, java.lang.String rFile) throws unlimited.core.util.common.exception.FCException, java.io.IOException
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
filesMatch
public static MD5Result filesMatch(java.nio.file.Path file, java.lang.String rFile, boolean invalidateRemoteMD5CacheEntry, FilesMatchHandler filesMatchHandler) throws java.io.IOException, unlimited.core.util.common.exception.FCException
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
filesMatchPartial
public static MD5Result filesMatchPartial(java.nio.file.Path file, java.lang.String rFile, long checkInterval, long checkLength, boolean invalidateRemoteMD5CacheEntry, FilesMatchHandler filesMatchHandler) throws java.io.IOException, unlimited.core.util.common.exception.FCException
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
filesMatch
protected MD5Result filesMatch(java.nio.file.Path file, java.lang.String rFile, boolean invalidateRemoteMD5CacheEntry) throws unlimited.core.util.common.exception.FCException, java.io.IOException
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
filesMatchPartial
protected MD5Result filesMatchPartial(java.nio.file.Path file, java.lang.String rFile, long checkInterval, long checkLength) throws unlimited.core.util.common.exception.FCException, java.io.IOException
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
permissionsAllowForDeltasTransfer
protected boolean permissionsAllowForDeltasTransfer()
Check to see if the permissions on teh server are OK for doing Deltas- Returns:
-
fileRegionMatch
protected boolean fileRegionMatch(java.nio.file.Path file, java.lang.String rFile, long offset, long length)
-
initializeProgressiveDelay
protected void initializeProgressiveDelay()
-
initializeTransferHeadersEachAppend
protected void initializeTransferHeadersEachAppend()
-
checkForServerTimeout
public boolean checkForServerTimeout()
- Specified by:
checkForServerTimeoutin interfaceFilesMatchHandler
-
setBandwidth
public void setBandwidth(int bandwidth)
-
isIncremental
public boolean isIncremental()
-
setIncremental
public void setIncremental(boolean incremental)
-
isIncrementalSizeCheckOnly
public boolean isIncrementalSizeCheckOnly()
-
setIncrementalSizeCheckOnly
public void setIncrementalSizeCheckOnly(boolean incrementalSizeCheckOnly)
-
getIncTransferOption
public int getIncTransferOption()
-
isTransferUsingDeltas
protected boolean isTransferUsingDeltas()
-
setCompressionMethod
public void setCompressionMethod(int compMethod)
-
getCompressionMethod
public int getCompressionMethod()
-
setCompressionLevel
public void setCompressionLevel(int compLevel)
-
getCompressionLevel
public int getCompressionLevel()
-
setCompressionStrategy
public void setCompressionStrategy(int cs)
-
getCompressionStrategy
public int getCompressionStrategy()
-
setIncTransferOption
public void setIncTransferOption(int incTransferOption)
-
isAutoResume
public boolean isAutoResume()
-
setAutoResume
public void setAutoResume(boolean autoResume)
-
getTransferMode
public int getTransferMode()
Description copied from interface:TransferStateReturns the current transfer mode- Specified by:
getTransferModein interfaceTransferState- Overrides:
getTransferModein classTransferHook- Returns:
- current transfer mode
-
setTransferMode
public void setTransferMode(int transferMode)
-
isSecure
public boolean isSecure()
Description copied from interface:TransferStateReturns true if transfer is secure- Specified by:
isSecurein interfaceTransferState- Overrides:
isSecurein classTransferHook- Returns:
- true if transfer is secure
-
getCountTransferred
public int getCountTransferred()
Description copied from interface:TransferStateReturns the number of files that were actually transferred. This differs from getFilesSofar() in that it only includes files that actually got transferred. Some may be skipped because incremental is set to true and had not changed on the server.- Specified by:
getCountTransferredin interfaceTransferState- Overrides:
getCountTransferredin classTransferHook- Returns:
- number of files actually transferred
-
isProgressiveTransfers
public boolean isProgressiveTransfers()
-
setProgressiveTransfers
public void setProgressiveTransfers(boolean progressiveTransfers)
-
setProgressiveTimeout
public void setProgressiveTimeout(int i)
-
getProgressiveTimeout
public int getProgressiveTimeout()
-
setProgressiveTimeoutFilter
public void setProgressiveTimeoutFilter(java.lang.String i)
-
getProgressiveTimeoutFilter
public java.lang.String getProgressiveTimeoutFilter()
-
isStorTmp
public boolean isStorTmp()
-
setStorTmp
public void setStorTmp(boolean storTmp)
-
isPreservePathStructure
public boolean isPreservePathStructure()
-
isUseCompression
public boolean isUseCompression()
-
getTmpMode
public int getTmpMode()
-
getCompFileFilter
public java.lang.String getCompFileFilter()
-
getUniqueID
public java.lang.String getUniqueID()
-
getActiveIndex
public int getActiveIndex()
-
removeIndex
public void removeIndex(int index)
-
getMinimumDeltaSize
public static long getMinimumDeltaSize(long sourceFileSize, long destFileSize)
-
getMaximumDeltaSize
public static long getMaximumDeltaSize(long sourceFileSize, long destFileSize)
-
shouldPerformIncremental
public static boolean shouldPerformIncremental(long sourceFileSize, long destFileSize)
-
main
public static void main(java.lang.String[] args)
-
getSizeTransferredAlreadyCurrentFile
public long getSizeTransferredAlreadyCurrentFile()
Description copied from interface:TransferStateReturns the number of bytes that were already transferred for this file (usually due to a resume)- Specified by:
getSizeTransferredAlreadyCurrentFilein interfaceTransferState- Overrides:
getSizeTransferredAlreadyCurrentFilein classTransferHook- Returns:
- long the number of bytes that were already transferred for this file (usually due to a resume)
-
getSizeTransferredAlreadyAllFiles
public long getSizeTransferredAlreadyAllFiles()
Size of files which are already found on the destination, if incremental is on and file was skipped or if file transfer was resumed where 2 GB of data was there and you are continuing last 2GB of data.- Specified by:
getSizeTransferredAlreadyAllFilesin interfaceTransferState- Overrides:
getSizeTransferredAlreadyAllFilesin classTransferHook- Returns:
-
getLocalWorkingDirectory
public java.nio.file.Path getLocalWorkingDirectory()
-
setPreservePathStructure
public void setPreservePathStructure(boolean preservePathStructure)
-
setUseCompression
public void setUseCompression(boolean useCompression)
-
setTmpMode
public void setTmpMode(int tmpMode)
-
setCompFileFilter
public void setCompFileFilter(java.lang.String compFileFilter)
-
setUniqueID
public void setUniqueID(java.lang.String uniqueID)
-
setAvgRTT
public void setAvgRTT(long avgRTT)
-
setLocalWorkingDirectory
@Deprecated public void setLocalWorkingDirectory(java.lang.String localWorkingDirectory)
Deprecated.
-
setLocalWorkingDirectory
public void setLocalWorkingDirectory(java.nio.file.Path localWorkingDirectory)
-
deleteLocalFiles
protected void deleteLocalFiles(java.util.LinkedList<java.nio.file.Path> tmpFileList)
Attempts to delete all files marked in temp file list locally. This allows the TransmitHandlers and RecieveHandlers to build up a list of files during deltas and have them deleted automatically in a try-finally block after the procedure exits.- Parameters:
tmpFileList- LinkedList LinkedList of Files that must be deleted.
-
deleteRemoteFileNames
protected void deleteRemoteFileNames(java.util.LinkedList<java.lang.String> tmpFileList)
Attempts to delete all remote files marked in temp file list. This allows the TransmitHandlers and RecieveHandlers to build up a list of files during deltas and have them deleted automatically in a try-finally block after the procedure exits.- Parameters:
tmpFileList- LinkedList LinkedList of filenames that must be deleted.
-
getSignatureFilename
public static java.lang.String getSignatureFilename(java.lang.String originalFilename, java.lang.String uniqueID)Returns the delta filename used when caculating signatures during a transfer. Unique name allows multiple signatures to be generated by multiple clients on the same file concurrently.- Parameters:
originalFilename- StringuniqueID- String- Returns:
- String
-
getDeltaFilename
public static java.lang.String getDeltaFilename(java.lang.String originalFilename, java.lang.String uniqueID)Returns the delta filename used when caculating deltas during a transfer. Unique name allows multiple deltas to be generated by multiple clients on the same file concurrently.- Parameters:
originalFilename- StringuniqueID- String- Returns:
- String
-
getMD5Key
public static java.lang.String getMD5Key(java.nio.file.Path file)
-
isAddSkippedFilesToTransferVector
public boolean isAddSkippedFilesToTransferVector()
-
getRemoteWorkingDirectory
public java.lang.String getRemoteWorkingDirectory()
-
getMaxTries
public int getMaxTries()
-
getWaitRetry
public long getWaitRetry()
-
isTransferEmptyDirectories
public boolean isTransferEmptyDirectories()
-
getCallbackHandler
public FileCatalystClientCallbackHandler getCallbackHandler()
-
getRegex
public java.lang.String getRegex()
-
getPostURL
public java.lang.String getPostURL()
-
isDeletePartial
public boolean isDeletePartial()
-
setAddSkippedFilesToTransferVector
public void setAddSkippedFilesToTransferVector(boolean addSkippedFilesToTransferVector)
-
setSizeCurrentFile
public void setSizeCurrentFile(long sizeCurrentFile)
-
setRemoteWorkingDirectory
public void setRemoteWorkingDirectory(java.lang.String remoteWorkingDirectory)
-
setMaxTries
public void setMaxTries(int maxTries)
-
setWaitRetry
public void setWaitRetry(long waitRetry)
-
setTransferEmptyDirectories
public void setTransferEmptyDirectories(boolean transferEmptyDirectories)
-
setCallbackHandler
public void setCallbackHandler(FileCatalystClientCallbackHandler callbackHandler)
-
setRegex
public void setRegex(java.lang.String regex)
-
checkRegex
public boolean checkRegex(java.lang.String filename)
-
setPostURL
public void setPostURL(java.lang.String postURL)
-
setDeletePartial
public void setDeletePartial(boolean deletePartial)
-
handleError
public void handleError(java.lang.String postURL, java.lang.Exception e)- Specified by:
handleErrorin interfacePostURLTransfer.TransferHolder
-
setAppletTransferCache
public void setAppletTransferCache(java.util.HashMap<java.lang.String,java.lang.Long> transferCache)
-
getPacketLossPercent
public double getPacketLossPercent()
Description copied from interface:TransferStateReturns the packet loss percent for the current transfer. Always returns 0 for non-UDP transfers.- Specified by:
getPacketLossPercentin interfaceTransferState- Overrides:
getPacketLossPercentin classTransferHook- Returns:
- packet loss percentage for current transfer
-
getRoundTripTime
public int getRoundTripTime()
Description copied from interface:TransferStateReturns the current round trip time- Specified by:
getRoundTripTimein interfaceTransferState- Overrides:
getRoundTripTimein classTransferHook- Returns:
- the current round trip time
-
getVerifyMode
public int getVerifyMode()
- Returns:
- the verifyMode
-
setVerifyMode
public void setVerifyMode(int verifyMode)
- Parameters:
verifyMode- the verifyMode to set
-
validateVerifyMode
public int validateVerifyMode(int verifyMode)
-
enableVerifySizeIfNeeded
protected void enableVerifySizeIfNeeded()
-
verifierRunning
public boolean verifierRunning()
-
getMd5RateLimit
public int getMd5RateLimit()
- Specified by:
getMd5RateLimitin interfaceFilesMatchHandler- Returns:
- the md5RateLimit
-
setMd5RateLimit
public void setMd5RateLimit(int md5RateLimit)
- Parameters:
md5RateLimit- the md5RateLimit to set
-
isRenameExtensions
public boolean isRenameExtensions()
- Returns:
- the renameExtensions
-
setRenameExtensions
public void setRenameExtensions(boolean renameExtensions)
- Parameters:
renameExtensions- the renameExtensions to set
-
getZipFileSizeLimit
public long getZipFileSizeLimit()
- Returns:
- the zipFileSizeLimit
-
setZipFileSizeLimit
public void setZipFileSizeLimit(long zipFileSizeLimit)
- Parameters:
zipFileSizeLimit- the zipFileSizeLimit to set
-
isDowngradeModeOnReConnect
public boolean isDowngradeModeOnReConnect()
- Returns:
- the downgradeModeOnReConnect
-
setDowngradeModeOnReConnect
public void setDowngradeModeOnReConnect(boolean downgradeModeOnReConnect)
- Parameters:
downgradeModeOnReConnect- the downgradeModeOnReConnect to set
-
getCurrentFileTime
public long getCurrentFileTime()
- Returns:
- the currentFileTime
-
calculateAverageKbpsRate
protected int calculateAverageKbpsRate(long bytesTotal, long msTotal)Calculate a transfer rate in kilo bits per second Kilo here means a 1000, because this is a rate. We're not counting power of 2 sized blocks stored on disk- Parameters:
bytesTotal- - total bytesmsTotal- - total time span in milliseconds- Returns:
- rate in kilo bits per second
-
getCurrentFileTransferTime
public long getCurrentFileTransferTime()
Description copied from interface:TransferStateReturns the transfer time for the current file in milliseconds- Specified by:
getCurrentFileTransferTimein interfaceTransferState- Overrides:
getCurrentFileTransferTimein classTransferHook- Returns:
- the transfer time for the current file in milliseconds
-
getDirection
public int getDirection()
Description copied from interface:TransferStateReturns either UPLOAD or DOWNLOAD constant depending on the direction of this transfer- Specified by:
getDirectionin interfaceTransferState- Overrides:
getDirectionin classTransferHook- Returns:
- the direction
-
getRemoteFilename
public java.lang.String getRemoteFilename()
Description copied from interface:TransferStateReturns the full path of the remote file currently being transferred- Specified by:
getRemoteFilenamein interfaceTransferState- Overrides:
getRemoteFilenamein classTransferHook- Returns:
- the remoteFilename
-
getLocalFilename
public java.lang.String getLocalFilename()
Description copied from interface:TransferStateReturns the full path of the local file currently being transferred- Specified by:
getLocalFilenamein interfaceTransferState- Overrides:
getLocalFilenamein classTransferHook- Returns:
- the localFilename
-
logFinalTransferStats
public void logFinalTransferStats(java.nio.file.Path file)
- Parameters:
file-
-
getFilter
public FileCatalystFileFilter getFilter()
- Returns:
- the filter
-
setFilter
public void setFilter(FileCatalystFileFilter filter)
- Parameters:
filter- the filter to set
-
passesProgressiveTimeoutFilter
protected boolean passesProgressiveTimeoutFilter(java.lang.String sourceFile)
-
calculateEffectiveRateOfZipTransfer
public int calculateEffectiveRateOfZipTransfer(long sizeOfAllFilesZipped, long timeForEffectiveRate)
-
verifySize
protected void verifySize(java.nio.file.Path file, java.lang.String rFile)
-
verifyFileContents
protected void verifyFileContents(java.nio.file.Path file, java.lang.String rfile, boolean invalidateRemoteCache) throws unlimited.core.util.common.exception.FCException, java.io.IOException- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
incrementSofarAllFiles
protected void incrementSofarAllFiles(boolean isADeltaTransfer, long dataSize)
-
doesDirectoryContainContents
protected abstract boolean doesDirectoryContainContents(T t)
-
filterEmptyDirectoriesIfNeeded
protected void filterEmptyDirectoriesIfNeeded()
-
setParentPooled
public void setParentPooled(boolean pooled)
-
getClient
public FCClientEngine getClient()
- Specified by:
getClientin interfaceFilesMatchHandler
-
logMessage
public void logMessage(java.util.logging.Level info, java.lang.String string)- Specified by:
logMessagein interfaceFilesMatchHandler- Specified by:
logMessagein interfacePostURLTransfer.TransferHolder
-
getAvgMD5TimePerKB
public long getAvgMD5TimePerKB()
- Specified by:
getAvgMD5TimePerKBin interfaceFilesMatchHandler
-
setAvgMD5TimePerKB
public void setAvgMD5TimePerKB(long avgMD5TimePerKB)
- Specified by:
setAvgMD5TimePerKBin interfaceFilesMatchHandler
-
getCancelHandler
public unlimited.core.util.common.CancelHandler getCancelHandler()
- Specified by:
getCancelHandlerin interfaceFilesMatchHandler
-
getPreservePathStructureFileName
public static java.lang.String getPreservePathStructureFileName(java.lang.String lFile)
-
setAutoUnzip
public void setAutoUnzip(boolean b)
-
isAutoUnzip
public boolean isAutoUnzip()
-
addTransferredRemoteFile
public void addTransferredRemoteFile(java.lang.String filename)
-
addTransferredLocalFile
public void addTransferredLocalFile(java.lang.String filename)
-
waitForDiscWriteProgressives
public static void waitForDiscWriteProgressives(MultiTransferHandler<?> handler)
-
handleProgressiveDelayBeforeAppend
public void handleProgressiveDelayBeforeAppend()
-
updateStatusTransferring
protected final void updateStatusTransferring()
-
getRetransferHeaderSize
public long getRetransferHeaderSize()
- Returns:
- the retransferHeaderSize
-
setRetransferHeaderSize
public void setRetransferHeaderSize(long retransferHeaderSize)
- Parameters:
retransferHeaderSize- the retransferHeaderSize to set
-
getClientAPI
public FCClient getClientAPI()
- Returns:
- the clientAPI
-
setClientAPI
public void setClientAPI(FCClient clientAPI)
- Parameters:
clientAPI- the clientAPI to set
-
killAll
public void killAll()
- Overrides:
killAllin classTransferHook
-
setLocalMD5
public void setLocalMD5(java.lang.String localMD5)
- Specified by:
setLocalMD5in interfaceFilesMatchHandler
-
setRemoteMD5
public void setRemoteMD5(java.lang.String remoteMD5)
- Specified by:
setRemoteMD5in interfaceFilesMatchHandler
-
-