Package unlimited.fc.client.engine
Class FCClientEngine
- java.lang.Object
-
- unlimited.fc.client.engine.FCClientEngine
-
- All Implemented Interfaces:
java.lang.AutoCloseable,java.util.Observer,unlimited.core.transfers.io.FCClientEngineBridge,unlimited.core.transfers.TransferHandler,unlimited.core.transfers.UDPTransferMetrics,unlimited.core.util.common.version.KnowsRemoteServiceVersionInterface
- Direct Known Subclasses:
FCClientEngineHTTP
public class FCClientEngine extends java.lang.Object implements java.util.Observer, unlimited.core.transfers.UDPTransferMetrics, unlimited.core.util.common.version.KnowsRemoteServiceVersionInterface, unlimited.core.transfers.io.FCClientEngineBridgeSupports client-side FileCatalyst operations The protocol used by FC (FileCatalyst client) is similar with FTP protocol
-
-
Field Summary
Fields Modifier and Type Field Description static intAUTOprotected java.lang.StringcachePWDprotected java.lang.StringclientAgentIDprotected java.lang.StringclientNameprotected java.nio.file.PathclientWorkingPathstatic intcommandChannelProtocolstatic intFTPprotected booleanhttpstatic intHTTPprotected booleanisConnectedprotected booleanisFileCatalystServerprotected booleanisFileCatalystServerEnterpriseprotected booleanisFileCatalystServerProprotected booleanisLoggedInprotected booleanisTransferringDataprotected intmaxServerRateprotected com.google.common.cache.Cache<java.lang.String,java.lang.String>modtimeCacheprotected unlimited.core.transfers.io.MonitoredTransfermonitoredTransferprotected intnewDownloadRateprotected booleanprintDebugStatementsprotected intreadTimeoutLongprotected unlimited.core.util.common.version.RemoteServiceVersionremoteServiceVersionprotected java.lang.StringserverAgentIDprotected java.lang.StringservletLocationintsessionCountprotected java.lang.StringsessionIDprotected intsessionPrioritylongsessionTimeStampprotected booleanshouldPerformServerPostProcessprotected com.google.common.cache.Cache<java.lang.String,java.lang.String>sizeCacheprotected unlimited.core.util.common.net.ssl.FCSSLSocketProducerImplsslSocketProducerprotected static intstreamCapstatic com.google.common.cache.Cache<java.lang.String,java.lang.String>systemCacheprotected inttargetRateprotected static FileListDataItemTERMINALprotected java.lang.StringTOKEN_AUTH_SUCCESS_HEADERprotected inttransferIDprotected unlimited.core.transfers.io.udptransfers.UDPTransferSettingstransferSettingsstatic intUDPstatic java.lang.StringUNABLE_TO_CONNECT_TO_NON_FILE_CATALYST_SERVER-
Fields inherited from interface unlimited.core.transfers.io.FCClientEngineBridge
FC_125_RESPONSE, FC_150_RESPONSE, FC_200_RESPONSE, FC_202_RESPONSE, FC_211_RESPONSE, FC_213_RESPONSE, FC_214_RESPONSE, FC_215_RESPONSE, FC_220_RESPONSE, FC_221_RESPONSE, FC_225_RESPONSE, FC_226_RESPONSE, FC_230_RESPONSE, FC_250_RESPONSE, FC_252_RESPONSE, FC_255_RESPONSE, FC_256_RESPONSE, FC_257_RESPONSE, FC_260_RESPONSE, FC_331_RESPONSE, FC_350_RESPONSE, FC_421_RESPONSE, FC_450_RESPONSE, FC_550_RESPONSE, FC_553_RESPONSE
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedFCClientEngine()Default constructor -- used by FCClientEngineHTTP
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidabort(boolean waitForReply)Abort a FileCatalyst transmision and receptionvoidabortAck(boolean abortAck)longaccessTime(java.lang.String fileName)Get the last access time of the named file from the remote server.voidaddClientConnectKey(java.lang.String key)voidapplyPatch(java.lang.String remoteFile, java.lang.String remotePatch, long offset)Applies a patch file on the remote server to the specified file at the specified offsetvoidapplyRemoteFileAttributesToLocalFile(java.nio.file.Path localFile, java.lang.String remoteFile)voidbinary()protected java.lang.StringbuildFilterCommand(FileCatalystFileFilter<?> filter)Builds the command that will bew used to send the filte data to the Serverprotected java.lang.StringbuildUNZIPCommand(java.lang.String remoteFile, boolean maintainPermissions, boolean maintainTimeStamp)protected java.lang.StringbuildWeblinkCommand(WeblinkDataContainer linkDO)booleancancelTransfer()Cancels the current transfer, if one is occurringvoidcdup()Change to the parent directoryvoidchdir(java.lang.String dir)Change the remote working directory to that suppliedbooleancheckDownloadPermissions()Returns true if this user acount has download permissionsbooleancheckUploadModifyPermissions()Returns true if this user acount has upload/modify/rename permissions Use A Random String Because Fast Machines With Multi-Client Can Have Overlapping Timeslicesvoidclose()static FCClientEnginecreateFCClientEngine(java.lang.String remoteHost, boolean sslSocket)Used by test classstatic FCClientEnginecreateFCClientEngine(java.lang.String remoteHost, boolean sslSocket, FCClient fcClient)static unlimited.core.transfers.io.FCClientEngineBridgecreateFCClientEngine(java.net.Socket controlSocket, boolean sslSocket, java.util.function.Supplier<ClientCredentials> credentials, unlimited.core.util.common.logs.LogUtils log, int millis)Used by FCClient.javastatic FCClientEnginecreateFCClientEngine(java.net.Socket controlSocket, boolean sslSocket, java.util.function.Supplier<ClientCredentials> credentials, unlimited.core.util.common.logs.LogUtils log, int millis, FCClient fcClient)static FCClientEnginecreateFCClientEngine(FCClientControlSocketRequestData ctrlSocketData)Main constructor call, used by most FileCatalyst products.static FCClientEnginecreateFCClientEngine(FCClientControlSocketRequestData ctrlSocketData, FCClient fcClient)java.lang.StringcreatePatch(java.lang.String remoteFile, long offset, long length)Creates a new patch file on the remote server that contains the bytes from offset to offeset+length of remoteFilejava.net.SocketcreateThirdPartyFTPServerDataConnection(java.lang.String command)longcreationTime(java.lang.String fileName)Get the creation time of the named file from the remote server.unlimited.core.transfers.io.FCClientControlSocketBridgectrlClient()voiddelete(java.lang.String remoteFile)Delete the specified remote filevoiddeleteAll(java.util.List<java.lang.String> remoteFiles)Bulk delete, deletes all the specified files in a single command.voiddeleteAll(java.util.List<java.lang.String> remoteFiles, boolean ftpDelete)Bulk delete, deletes all the specified files in a single command.voiddeleteAll(FileListData remoteFiles)voiddeleteAll(FileListData remoteFiles, boolean ftpDelete)voiddetectFCServer()protected voiddetectSessionKilledByAdmin()FileListDatadir()List current directory's contents as an array of strings of filenames.FileListDatadir(java.lang.String dirname)List a directory's contents as an array of strings of filenames.FileListDatadir(java.lang.String dirname, boolean full)List a directory's contents as an array of strings.FileListDatadir(java.lang.String dirname, boolean full, java.lang.String filterFlag)List a directory's contents as an array of strings.FileListDatadir(java.lang.String dirname, boolean full, java.lang.String filterFlag, java.lang.String wildcard)List a directory's contents as an array of strings.java.lang.String[]dirRaw(java.lang.String dirname, boolean full, java.lang.String filterFlag)protected FileListDatadoDirListing(java.lang.String dirname, boolean full, java.lang.String filterFlag, java.lang.String wildcard, FileListDataItemConsumer resultData)protected FileListDatadoDirListing(java.lang.String dirname, boolean full, java.lang.String filterFlag, java.lang.String wildcard, FileListDataItemConsumer resultData, java.util.function.BooleanSupplier isCancelled)java.util.stream.Stream<FileListDataItem>doDirStream(java.lang.String dirname, boolean full, java.lang.String filterFlag, java.lang.String wildcard, FileListDataItemConsumer resultData, java.util.function.BooleanSupplier isCancelled)java.util.stream.Stream<FileListDataItem>doDirStream(DirListParams params)booleanexists(java.lang.String remoteFile)Test if the remote file, denoted by the given remote path, exists on the server and returns true if it exists, false otherwise.unlimited.core.util.common.AutoClose<unlimited.core.util.common.stream.PairStream<java.lang.String,java.lang.Boolean>>exists(java.util.stream.Stream<java.lang.String> nameStream)java.lang.StringfeatureSet()Get the feature list from the serverjava.util.ArrayList<FileSystemEvent>fileSystemEvents(long timeout)Get a list of file system events from the servervoidfilter(long olderThan, long newerThan, long upperByteLimit, long lowerByteLimit, java.lang.String filterString, int filterMode, boolean applyFilterToDirectories)Deprecated.This method is deprecated.voidfilter(FileCatalystFileFilter<?> filter)Initializes the file filter on the server.voidflushCaches()Flush the caches used in the transfervoidgenerateNewTransferID()voidget(DownloadTransferRequestData downloadRequestData)Get a file from the FileCatalyst server.ServerConfigsgetAllServerClientConfigs()AutoDetectDatagetAutoDetectData()intgetBlastRate()2015/11/25 - leaving the comment below on what this returns, but noting that what it really returns is the mean average of total good data sent.java.lang.StringgetCachedPWD()java.lang.StringgetClientAgentID()intgetClientIdentifier()java.lang.StringgetClientString()intgetClientSubIdentifier()java.lang.ObjectgetComLock()intgetCompLevel()intgetCompMethod()intgetCompStrategy()intgetCongestionControlAggression()java.util.Map<java.lang.String,java.lang.Integer>getCurrentFileToIDs()intgetCurrentGoodputRate()intgetCurrentRate()intgetCurrentRTT()int[]getDataPort()protected DirListToolgetDirListTool(DirListParams p, FCClientEngine e)booleangetDone()voidgetDone(boolean isDone)java.lang.StringgetErrorMessage()Get the last error message textFCClientgetFCClientObject()unlimited.core.util.common.forceFileOwnership.ForceFileOwnershipConfiggetForceFileOwnerConfig()com.google.common.hash.HashCodegetHashCode()voidgetHTTP(DownloadTransferRequestData requestData)intgetIdealConcurrentFTPStreams(int rate, long length, int bufferSize, int maxStream)booleangetIsTransferringData()java.lang.StringgetLastReplyText()Gets the latest valid reply from the serverlonggetLastThroughtput()unlimited.core.transfers.io.FCReplygetLastValidReply()Gets the latest valid reply from the serverprotected java.lang.StringgetLocalHost()unlimited.core.util.common.logs.LogUtilsgetLogger()java.lang.StringgetMD5(java.lang.String remoteFile)Request the MD5 digest of the remote filejava.lang.StringgetMD5(java.lang.String remoteFile, long offset, long length)Request the MD5 digest of the remote filejava.lang.StringgetMD5(java.lang.String remoteFile, long offset, long length, long checkInterval, long checkLength)Request the Partial MD5 digest of the remote fileintgetMeanEffectiveRate()unlimited.core.transfers.io.MonitoredTransfergetMonitoredTransfer()intgetNumFTPStreams()intgetNumUDPSockets()doublegetPacketLoss()java.lang.StringgetPlatForm()protected java.lang.StringgetRemoteHost()unlimited.core.util.common.version.RemoteServiceVersiongetRemoteServiceVersion()Returns the remote service version of the server.unlimited.fc.reporting.ClientDataReportgetReporter()FCClientReportManagergetReportManager()Returns the report manager that is used to encapsulate all reporting functionality into one single resourcejava.lang.StringgetReportStatus(unlimited.core.transfers.io.MonitoredTransfer monTransfer)java.lang.StringgetReportStatus(MultiTransferHandler<?> monTransfer)java.lang.StringgetServerAgentID()java.lang.StringgetServerConfigurationValue(java.lang.String request)intgetServerLinkExpiryDayValue()java.lang.StringgetServerVersion()java.lang.StringgetServletLocation()intgetSessionCount()java.lang.StringgetSessionID()static FCClienEngineSpeedCachegetSpeedcache()intgetStartRate()protected java.lang.StringgetSystKey()java.lang.StringgetTaskID()longgetTransferGoodput()intgetTransferID()longgetTransferLength()unlimited.core.transfers.UDPTransferMetricsContainergetTransferMetrics()Returns transfer metric container specific to UDP transfers.intgetTransferPercent()intgetTransferRate()unlimited.core.transfers.io.udptransfers.UDPTransferSettingsgetTransferSettings()longgetTransferThroughput()floatgetTransmitZipRatio()java.lang.StringgetUserEmail()Returns The User's Email Address When Requestedjava.lang.StringgetUserFullName()Gathers The Full Name Of The UserUserPermissionsContainergetUserPermissions()Gathers The User's Permissions From The Serverprotected java.lang.StringgetVersionForSetup()java.lang.StringgetWelcomeMessage()voidgobbleExtraReplies(int incomingTimeout, int incomingNumToGobble)booleanhasAutoDetectData()booleanhasReporter()java.lang.Stringhelp(java.lang.String command)Get the help text for the specified commandprotected voidinformServerToWriteReport(PropertyTransmission reportArgs)voidinitAES()Send a AESK command, initialized the AES secret key on the serverint[]initFCTransfer(int numDecoders, int blockSize, int unitSize, long length, boolean congestionControl, int fileID, int mode)static voidinitSOCKS(java.lang.String port, java.lang.String host)Set up SOCKS v4/v5 proxy settings.static voidinitSOCKSAuthentication(java.lang.String username, java.lang.String password)Set up SOCKS username and password for SOCKS username/password authentication.protected java.lang.StringinnerSyst()protected booleaninnerZipChunkTest(java.lang.String zipFileName)voidisAborted(boolean isAborted)booleanisAllowConnectNonFileCatalystServer()protected booleanisChannelClosed(java.lang.String message)booleanisComplete()booleanisCongestionControl()booleanisConnected()Get the connection statusbooleanisDeltasStillGrowing()booleanisFileCatalystServer()True if it is a FileCatalyst Server.booleanisFileCatalystServerEnterprise()booleanisFileCatalystServerPro()True if is a PRO (non-UDP) FileCatalyst License.booleanisForceTCPmodeACKs()booleanisHttp()booleanisLinkEnabledOnServer()booleanisLoggedIn()booleanisProgressiveTransfer()booleanisQuitting()booleanisReportingEnabled()booleanisServerBandwidthOverride()booleanisServerTimeout()booleanisTimeout(java.lang.String message)booleanisTransferCancelled()booleanisTransferComplete()booleanisTransferError()booleanisUseCompression()booleanisZipStillExtracting()booleanisZipStillGrowing(java.lang.String zipFileName)intlastServerRestrictedRate()unlimited.core.transfers.io.FCReplylastValidReply()voidlastValidReply(unlimited.core.transfers.io.FCReply validateReply)voidlog(java.lang.String line)voidlog(java.lang.String line, java.lang.Throwable e)voidmkdir(java.lang.String remotedir)Create the specified remote working directoryvoidmkdlt(java.lang.String srcfile, java.lang.String sigfile, int blockLength, boolean compress, int compLevel, int strategy)Called by ReceiverHandler to create a delta file remotely.voidmkdlt(java.lang.String srcfile, java.lang.String sigfile, int blockLength, boolean compress, int compLevel, int strategy, java.lang.String uniqueID, boolean waitForDeltaCreation)Called by ReceiverHandler to create a delta file remotely.voidmkfile(java.lang.String file)Create the specified remote working directoryjava.lang.Stringmksig(java.lang.String srcfile, boolean compress, java.lang.String uniqueID)java.lang.Stringmksig(java.lang.String srcfile, java.lang.String uniqueID)java.util.Datemodtime(java.lang.String remoteFile)Get modification time for a remote filejava.util.Datemodtime(java.lang.String remoteFile, boolean bypassCache)Get modification time for a remote filevoidmodtime(java.lang.String remoteFile, java.util.Date d)Set modification time for a remote filebooleanmonitorIsNull()voidnoop()Send a NOOP commandvoidnotifyServerOfCurrentRTT()intnumFTPStreams()voidnumFTPStreams(int streams)voidoverrideSessionID(java.lang.String sessionID)protected java.lang.StringperformAsyncMD5(java.lang.String md5Command)protected java.lang.StringperformSyncedMD5(java.lang.String md5Command)java.lang.String[]prms(java.lang.String fileName)Return the file permission of the file/directory listed in the argument from the remote server.voidput(UploadTransferRequestData requestData)Put a local file onto the FileCatalyst server.booleanputDone()voidputDone(boolean putDone)booleanputIsFinished()java.lang.Stringpwd()Get the current remote working directoryvoidquit()Quit the FileCatalyst sessionvoidquit(boolean flushCaches)Quit the FileCatalyst session, optionally do not flush the cache, in the case of a reconnect attemptvoidquote(java.lang.String command, java.lang.String[] validCodes)Issue arbitrary FileCatalyst commands to the FileCatalyst server.java.lang.Stringrbfil(java.lang.String srcfile, java.lang.String deltafile, int blockLength, boolean compress, int level, boolean uniqueName)intreadTimeout()voidreadTimeout(int readTimeout)voidreconnect(boolean maintainCurrentDirectory)protected voidrefreshCachedPWD(java.lang.String dir)voidregisterReportListener(MultiTransferHandler<?> mth)unlimited.core.util.common.version.RemoteServiceVersionremoteServiceVersion()java.util.stream.Stream<FileListDataItem>remoteSynchFile(java.util.stream.Stream<FileListDataItem> itemStream)voidremoteTransferInitiate(ServerToServerTransferSettings settings)Initiate ajava.lang.StringremoteTransferStatus()voidrename(java.lang.String from, java.lang.String to)Rename a file or directoryvoidresetTransferVariables()voidrmdir(java.lang.String dir)Delete the specified remote working directoryvoidrmdirRecursive(FileListDataItem item)Recursively delete a remote foldervoidsendEmail(java.lang.String emailAddress, int statusCode, java.lang.String note)Instruct the server to send an email to the administratorvoidsendJobStatus(TransferStatusEnum status)protected voidsendRTTKeepALive()protected voidsendTransmitRateCommand(int targetRate, int startRate)WeblinkResultsendWeblink(WeblinkDataContainer linkDO)Creates A Weblink From The Data Container GivenvoidserverPostProcess(java.lang.String file)Execute post processing on the specified filebooleanserverSupportsFSEvents()Checks if FSEVT command is supported.booleanserverSupportsUDP()voidsetAutoDetectData(FCClient fcClient)intsetBandwidth(int bandwidth)protected intsetBandwidthFTPReceiver(int bandwidth)protected intsetBandwidthFTPTransmit(int bandwidth, unlimited.core.transfers.io.MonitoredTransfer monitoredTransfer)protected voidsetBandwidthRemoteTransfer(int bandwidth)protected intsetBandwidthUDPSender(int bandwidth)protected intsetBandwidthUPDReceiver(int bandwidth)voidsetClientAgentID(java.lang.String clientAgentID)voidsetClientIdentifier(int clientIdentifier)voidsetClientName(java.lang.String clientName)voidsetClientString(java.lang.String clientString)The client string provides additional information about the connecting client.voidsetClientSubIdentifier(int clientSubIdentifier)The sub identifier identifies this client as a sub component of a broader group of client apps.voidsetClientWorkingPath(java.nio.file.Path clientWorkingPath)voidsetCompLevel(int compLevel)voidsetCompMethod(int compMethod)voidsetCompStrategy(int compStrategy)Deprecated.We no longer support setting compression strategy.voidsetCongestionControl(boolean congestionControl)voidsetCongestionControlAggression(int congestionControlAggression)voidsetConnectMode(FCConnectMode mode)Deprecated.voidsetCurrentFilesMatch(FilesMatch filesMatch)voidsetCurrentFileToIDs(java.util.Map<java.lang.String,java.lang.Integer> currentFileToIDs)voidsetDataPort(int[] dataPort)Set the DataPortvoidsetDownloadRate(int targetRate, int startRate)Sets the target rate of the current transfervoidsetErrorMessage(java.lang.String errMess)Sets the last error message textvoidsetForceTCPmodeACKs(boolean forceTCPmodeACKs)voidsetHttp(boolean http)protected voidsetLastValidReply(unlimited.core.transfers.io.FCReply reply)voidsetLogStream(unlimited.core.util.common.logs.LogUtils log)Set the logging stream, replacing stdoutvoidsetMaxRate(int rate)voidsetMaxServerRate(int rate)set the max server rate (aka bandwidth)voidsetMonitoredTransfer(unlimited.core.transfers.io.MonitoredTransfer monitoredTransfer)voidsetNumFTPStreams(int numFTPStreams)voidsetNumUDPSockets(int numUDPSockets)voidsetOverrideServerBandwidth(unlimited.core.transfers.io.ftptransfers.FTPTransmit transfer)voidsetProgressiveTransfer(boolean isProgressive)This state is needed to suppress or allow a user data report to be written when the transfer completes.voidsetQuitting(boolean quitting)voidsetReadTimeout(int millisecs)This is the timeout value that get set when we are sending commands that should not take long to execute, PWD, LIST, etc...voidsetReadTimeoutLong(int millisecs)This is the timeout value that get set when we are sending commands that take long to execute, MD5, MKDLT, etc...voidsetReportManager(FCClientReportManager reporter)voidsetServletLocation(java.lang.String servletLocation)voidsetSessionPriority(int priority)voidsetSslSocketProducer(unlimited.core.util.common.net.ssl.FCSSLSocketProducerImpl sslSocketProducer)voidsetStartRate(int startRate)voidsetTaskID(java.lang.String taskID)protected voidsetTransferID(int transferID)voidsetTransferSettings(unlimited.core.transfers.io.udptransfers.UDPTransferSettings transferSettings)voidsetUDPTransferMetrics(unlimited.core.transfers.UDPTransferMetrics udp)voidsetup(java.util.function.Supplier<ClientCredentials> newCredentials)Login into an account on the FileCatalyst server.voidsetUseCompression(boolean useCompression)voidsetUserEmail(java.lang.String newEmail)Sets the user's email addressvoidsetUserFullName(java.lang.String newName)voidsetVerifyMode(int verifyMode)voidsetWelcomeMessage(java.lang.String welcomeMessage)booleanshouldPerformServerPostProcess()booleansite(java.lang.String command)Run a site-specific command on the server.java.lang.Stringsize(java.lang.String fileName, boolean bypassCache)Get the size of the named file from the remote server.java.util.stream.Stream<FileListDataItem>streamWithInlineParse(java.lang.String directory, java.util.function.BooleanSupplier isSynched, java.lang.AutoCloseable closer)java.util.stream.Stream<FileListDataItem>streamWithInlineParse(java.lang.String directory, java.util.function.BooleanSupplier isSynched, java.lang.AutoCloseable closer, java.util.function.BooleanSupplier isCancelled)java.util.stream.Stream<FileListDataItem>streamWithInlineParse(java.lang.String directory, FCClient fcClient)java.util.stream.Stream<FileListDataItem>streamWithInlineParse(java.lang.String directory, FCClient fcClient, java.util.function.BooleanSupplier isCancelled)voidsyncFileType(FileListDataItem aFile)java.lang.Stringsystem()Get the type of the OS at the serverinttestApproximateDownloadSpeed()Performs a quick test to determine the approximate download speed to the connected server.inttestApproximateUploadSpeed()Performs a quick test to determine the approximate upload speed to the connected server.voidtestDataConnection()voidtestDataConnection(boolean portFallback)Tests whether TCP data connection is possible.inttestIncomingUDP(int packetSize, int expectedPackets, int rate, int destinationPort)Send a RUDP command Server will send the specifed number of packets back to the client returns number of packets recieved by clientinttestMaximumDownloadSpeed()Performs a quick test to determine the approximate download speed to the connected server.inttestMaximumUploadSpeed()Performs a quick test to determine the approximate upload speed to the connected server.voidtestMultiDataConnection()inttestOutgoingUDP(int packetSize, int numpackets, int rate)Send a TUDP command returns number of packets received by the servervoidtestUDPACKs()voidunzip(java.lang.String remoteFile, boolean maintainPermissions, boolean maintainTimeStamp)Request that a file on the server be unzippedvoidupdate(java.util.Observable observable, java.lang.Object object)voidupdateReportWriter(java.lang.String transferType, java.lang.String transferDirection, long size, java.nio.file.Path localFile)protected voidvalidateLinkDataContainer(WeblinkDataContainer linkDO)voidwaitingForAbortAck(boolean waitingForAbortAck)voidzip(java.lang.String zipFilename, java.util.List<java.lang.String> remoteFiles)voidzip(java.lang.String zipFilename, java.util.List<java.lang.String> remoteFiles, long zipSizeLimit)voidzip(java.lang.String zipFilename, java.util.List<java.lang.String> remoteFiles, long zipSizeLimit, boolean waitForZipCreation, boolean needsRecurse)booleanzipErrors()
-
-
-
Field Detail
-
systemCache
public static com.google.common.cache.Cache<java.lang.String,java.lang.String> systemCache
-
printDebugStatements
protected final boolean printDebugStatements
- See Also:
- Constant Field Values
-
TERMINAL
protected static final FileListDataItem TERMINAL
-
streamCap
protected static final int streamCap
- See Also:
- Constant Field Values
-
readTimeoutLong
protected int readTimeoutLong
-
commandChannelProtocol
public static final int commandChannelProtocol
- See Also:
- Constant Field Values
-
UNABLE_TO_CONNECT_TO_NON_FILE_CATALYST_SERVER
public static final java.lang.String UNABLE_TO_CONNECT_TO_NON_FILE_CATALYST_SERVER
- See Also:
- Constant Field Values
-
TOKEN_AUTH_SUCCESS_HEADER
protected final java.lang.String TOKEN_AUTH_SUCCESS_HEADER
- See Also:
- Constant Field Values
-
FTP
public static final int FTP
- See Also:
- Constant Field Values
-
AUTO
public static final int AUTO
- See Also:
- Constant Field Values
-
HTTP
public static final int HTTP
- See Also:
- Constant Field Values
-
UDP
public static final int UDP
- See Also:
- Constant Field Values
-
isFileCatalystServerEnterprise
protected boolean isFileCatalystServerEnterprise
-
isFileCatalystServerPro
protected boolean isFileCatalystServerPro
-
isFileCatalystServer
protected boolean isFileCatalystServer
-
remoteServiceVersion
protected unlimited.core.util.common.version.RemoteServiceVersion remoteServiceVersion
-
isConnected
protected boolean isConnected
-
maxServerRate
protected int maxServerRate
-
monitoredTransfer
protected unlimited.core.transfers.io.MonitoredTransfer monitoredTransfer
-
targetRate
protected int targetRate
-
cachePWD
protected java.lang.String cachePWD
-
sizeCache
protected com.google.common.cache.Cache<java.lang.String,java.lang.String> sizeCache
-
modtimeCache
protected com.google.common.cache.Cache<java.lang.String,java.lang.String> modtimeCache
-
newDownloadRate
protected int newDownloadRate
-
clientName
protected java.lang.String clientName
-
clientWorkingPath
protected java.nio.file.Path clientWorkingPath
-
sessionID
protected java.lang.String sessionID
-
serverAgentID
protected java.lang.String serverAgentID
-
clientAgentID
protected java.lang.String clientAgentID
-
sessionTimeStamp
public final long sessionTimeStamp
-
sessionCount
public final int sessionCount
-
transferID
protected int transferID
-
servletLocation
protected java.lang.String servletLocation
-
http
protected boolean http
-
shouldPerformServerPostProcess
protected boolean shouldPerformServerPostProcess
-
transferSettings
protected unlimited.core.transfers.io.udptransfers.UDPTransferSettings transferSettings
-
isLoggedIn
protected boolean isLoggedIn
-
isTransferringData
protected boolean isTransferringData
-
sessionPriority
protected volatile int sessionPriority
-
sslSocketProducer
protected unlimited.core.util.common.net.ssl.FCSSLSocketProducerImpl sslSocketProducer
-
-
Method Detail
-
remoteServiceVersion
public unlimited.core.util.common.version.RemoteServiceVersion remoteServiceVersion()
- Specified by:
remoteServiceVersionin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
getTaskID
public java.lang.String getTaskID()
-
setTaskID
public void setTaskID(java.lang.String taskID)
-
setMonitoredTransfer
public void setMonitoredTransfer(unlimited.core.transfers.io.MonitoredTransfer monitoredTransfer)
- Specified by:
setMonitoredTransferin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
getLastThroughtput
public long getLastThroughtput()
-
getComLock
public java.lang.Object getComLock()
-
getMonitoredTransfer
public final unlimited.core.transfers.io.MonitoredTransfer getMonitoredTransfer()
- Specified by:
getMonitoredTransferin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
setUDPTransferMetrics
public void setUDPTransferMetrics(unlimited.core.transfers.UDPTransferMetrics udp)
- Specified by:
setUDPTransferMetricsin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
generateNewTransferID
public void generateNewTransferID()
- Specified by:
generateNewTransferIDin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
setTransferID
protected final void setTransferID(int transferID)
-
getCurrentFileToIDs
public java.util.Map<java.lang.String,java.lang.Integer> getCurrentFileToIDs()
-
setCurrentFileToIDs
public void setCurrentFileToIDs(java.util.Map<java.lang.String,java.lang.Integer> currentFileToIDs)
-
isQuitting
public boolean isQuitting()
-
setQuitting
public void setQuitting(boolean quitting)
-
createFCClientEngine
public static FCClientEngine createFCClientEngine(java.lang.String remoteHost, boolean sslSocket) throws java.io.IOException, unlimited.core.util.common.exception.FCException
Used by test class- Parameters:
remoteHost-sslSocket-- Returns:
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
createFCClientEngine
public static FCClientEngine createFCClientEngine(java.lang.String remoteHost, boolean sslSocket, FCClient fcClient) throws java.io.IOException, unlimited.core.util.common.exception.FCException
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
createFCClientEngine
public static FCClientEngine createFCClientEngine(FCClientControlSocketRequestData ctrlSocketData) throws java.io.IOException, unlimited.core.util.common.exception.FCException
Main constructor call, used by most FileCatalyst products.- Parameters:
remoteHost-ctrlClientPort-sslSocket-log-millis-enableReporting-- Returns:
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
createFCClientEngine
public static FCClientEngine createFCClientEngine(FCClientControlSocketRequestData ctrlSocketData, FCClient fcClient) throws java.io.IOException, unlimited.core.util.common.exception.FCException
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
createFCClientEngine
public static unlimited.core.transfers.io.FCClientEngineBridge createFCClientEngine(java.net.Socket controlSocket, boolean sslSocket, java.util.function.Supplier<ClientCredentials> credentials, unlimited.core.util.common.logs.LogUtils log, int millis) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionUsed by FCClient.java- Parameters:
controlSocket-sslSocket-user-password-log-millis-enableReporting-fileMode- File mode UDP Receiver should open up files. Valid modes should be "", rw, rws, rwd. Blank lets the OS detemine the mode (legacy)writeBufferSize- Size of write buffer (in bytes) to use to write to disk. Default size of zero will save files in block-size chunks.- Returns:
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
createFCClientEngine
public static FCClientEngine createFCClientEngine(java.net.Socket controlSocket, boolean sslSocket, java.util.function.Supplier<ClientCredentials> credentials, unlimited.core.util.common.logs.LogUtils log, int millis, FCClient fcClient) throws java.io.IOException, unlimited.core.util.common.exception.FCException
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
initSOCKS
public static void initSOCKS(java.lang.String port, java.lang.String host)Set up SOCKS v4/v5 proxy settings. This can be used if there is a SOCKS proxy server in place that must be connected thru. Note that setting these properties directs all TCP sockets in this JVM to the SOCKS proxy- Parameters:
port- SOCKS proxy porthost- SOCKS proxy hostname
-
initSOCKSAuthentication
public static void initSOCKSAuthentication(java.lang.String username, java.lang.String password)Set up SOCKS username and password for SOCKS username/password authentication. Often, no authentication will be required but the SOCKS server may be configured to request these.- Parameters:
username- the SOCKS usernamepassword- the SOCKS password
-
setReadTimeout
public void setReadTimeout(int millisecs)
This is the timeout value that get set when we are sending commands that should not take long to execute, PWD, LIST, etc...- Parameters:
millisecs- int
-
setConnectMode
@Deprecated public void setConnectMode(FCConnectMode mode)
Deprecated.Set the connect mode- Parameters:
mode- ACTIVE or PASV mode
-
isConnected
public boolean isConnected()
Get the connection status- Returns:
- true if a connection was established, otherwise false
-
setErrorMessage
public void setErrorMessage(java.lang.String errMess)
Sets the last error message text- Parameters:
errMess- text of the error message
-
setDataPort
public void setDataPort(int[] dataPort)
Set the DataPort- Parameters:
dataPort-
-
getDataPort
public int[] getDataPort()
-
getErrorMessage
public java.lang.String getErrorMessage()
Get the last error message text- Returns:
- text of the errpr message
-
setLogStream
public void setLogStream(unlimited.core.util.common.logs.LogUtils log)
Set the logging stream, replacing stdout- Parameters:
log- the new logging stream
-
setMaxServerRate
public void setMaxServerRate(int rate)
set the max server rate (aka bandwidth)- Parameters:
rate-
-
setMaxRate
public void setMaxRate(int rate)
-
getLastValidReply
public unlimited.core.transfers.io.FCReply getLastValidReply()
Gets the latest valid reply from the server- Specified by:
getLastValidReplyin interfaceunlimited.core.transfers.io.FCClientEngineBridge- Returns:
- reply object encapsulating last valid server response
-
getLastReplyText
public java.lang.String getLastReplyText()
Gets the latest valid reply from the server- Specified by:
getLastReplyTextin interfaceunlimited.core.transfers.io.FCClientEngineBridge- Returns:
- the text of last valid server response
-
setup
public void setup(java.util.function.Supplier<ClientCredentials> newCredentials) throws java.io.IOException, unlimited.core.util.common.exception.FCException
Login into an account on the FileCatalyst server. This call completes the entire login process Note that we only use the User/Pass if we haven't set the tokens on this client. If we have tokens we call that method.- Parameters:
ClientCredentials- credentials- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
setLastValidReply
protected void setLastValidReply(unlimited.core.transfers.io.FCReply reply)
-
testUDPACKs
public void testUDPACKs()
-
detectFCServer
public void detectFCServer() throws java.io.IOException, unlimited.core.util.common.exception.FCException- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
notifyServerOfCurrentRTT
public void notifyServerOfCurrentRTT() throws java.io.IOException, unlimited.core.util.common.exception.FCException- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
quit
public void quit() throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionQuit the FileCatalyst session- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
quit
public void quit(boolean flushCaches) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionQuit the FileCatalyst session, optionally do not flush the cache, in the case of a reconnect attempt- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
getVersionForSetup
protected java.lang.String getVersionForSetup()
-
abort
public void abort(boolean waitForReply) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionAbort a FileCatalyst transmision and reception- Specified by:
abortin interfaceunlimited.core.transfers.io.FCClientEngineBridge- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
checkDownloadPermissions
public boolean checkDownloadPermissions()
Returns true if this user acount has download permissions- Returns:
-
checkUploadModifyPermissions
public boolean checkUploadModifyPermissions()
Returns true if this user acount has upload/modify/rename permissions Use A Random String Because Fast Machines With Multi-Client Can Have Overlapping Timeslices
-
quote
public void quote(java.lang.String command, java.lang.String[] validCodes) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionIssue arbitrary FileCatalyst commands to the FileCatalyst server.- Specified by:
quotein interfaceunlimited.core.transfers.io.FCClientEngineBridge- Parameters:
command- command to be sent to servervalidCodes- valid return codes for this command- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
help
public java.lang.String help(java.lang.String command) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionGet the help text for the specified command- Parameters:
command- name of the command to get help on- Returns:
- help text from the server for the supplied command
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
system
public java.lang.String system() throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionGet the type of the OS at the server- Returns:
- the type of server OS
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
getSystKey
protected java.lang.String getSystKey()
-
innerSyst
protected java.lang.String innerSyst() throws java.io.IOException, unlimited.core.util.common.exception.FCException- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
featureSet
public java.lang.String featureSet() throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionGet the feature list from the server- Returns:
- String Returns the feature list of the server
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
serverSupportsFSEvents
public boolean serverSupportsFSEvents()
Checks if FSEVT command is supported. Only as of 2.8.1- Returns:
-
fileSystemEvents
public java.util.ArrayList<FileSystemEvent> fileSystemEvents(long timeout) throws java.io.IOException, unlimited.core.util.common.exception.FCException
Get a list of file system events from the server- Returns:
- String a list of file system events from the server
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
filter
public void filter(FileCatalystFileFilter<?> filter) throws java.io.IOException
Initializes the file filter on the server. This filter is applied to the next listing that is requested from the server. It is immediately reset by the server after each listing. Therefore it should be reset each time a listing is done if needed.- Parameters:
filter- Filter object containing the data that you wish to filter on- Throws:
java.io.IOException
-
buildFilterCommand
protected java.lang.String buildFilterCommand(FileCatalystFileFilter<?> filter) throws unlimited.core.util.common.exception.FCException
Builds the command that will bew used to send the filte data to the Server- Parameters:
filter- Filter that contains the data that we will be sending- Returns:
- String containing the full command
- Throws:
unlimited.core.util.common.exception.FCException
-
filter
@Deprecated public void filter(long olderThan, long newerThan, long upperByteLimit, long lowerByteLimit, java.lang.String filterString, int filterMode, boolean applyFilterToDirectories) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionDeprecated.This method is deprecated. Please usefilter(FileCatalystFileFilter)insteadInitializes the file filter on the server. This filter is applied to the next listing that is requested from the server. It is immediately reset by the server after each listing. Therefore it should be reset each time a listing is done if needed.- Parameters:
olderThan-newerThan-upperByteLimit-lowerByteLimit-filterString-filterMode-- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
modtime
public void modtime(java.lang.String remoteFile, java.util.Date d) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionSet modification time for a remote file- Parameters:
remoteFile- name of remote file- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
modtime
public java.util.Date modtime(java.lang.String remoteFile) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionGet modification time for a remote file- Parameters:
remoteFile- name of remote file- Returns:
- modification time of file as a date
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
modtime
public java.util.Date modtime(java.lang.String remoteFile, boolean bypassCache) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionGet modification time for a remote file- Parameters:
remoteFile- name of remote file- Returns:
- modification time of file as a date
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
flushCaches
public void flushCaches()
Flush the caches used in the transfer
-
noop
public void noop() throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionSend a NOOP command- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
log
public void log(java.lang.String line)
- Specified by:
login interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
log
public void log(java.lang.String line, java.lang.Throwable e)- Specified by:
login interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
getLogger
public unlimited.core.util.common.logs.LogUtils getLogger()
- Specified by:
getLoggerin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
testIncomingUDP
public int testIncomingUDP(int packetSize, int expectedPackets, int rate, int destinationPort) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionSend a RUDP command Server will send the specifed number of packets back to the client returns number of packets recieved by client- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
testOutgoingUDP
public int testOutgoingUDP(int packetSize, int numpackets, int rate) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionSend a TUDP command returns number of packets received by the server- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
testDataConnection
public void testDataConnection() throws java.io.IOException, unlimited.core.util.common.exception.FCException- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
testDataConnection
public void testDataConnection(boolean portFallback) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionTests whether TCP data connection is possible. Also allows you to specify whether to fall back to PORT if PASV fails.- Parameters:
portFallback-- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
testMultiDataConnection
public void testMultiDataConnection() throws java.io.IOException, unlimited.core.util.common.exception.FCException- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
isServerTimeout
public boolean isServerTimeout() throws unlimited.core.util.common.exception.FCException, java.io.IOException- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
initAES
public void initAES() throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionSend a AESK command, initialized the AES secret key on the server- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
pwd
public java.lang.String pwd() throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionGet the current remote working directory- Returns:
- the current working directory
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
cdup
public void cdup() throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionChange to the parent directory- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
exists
public boolean exists(java.lang.String remoteFile) throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionTest if the remote file, denoted by the given remote path, exists on the server and returns true if it exists, false otherwise.- Parameters:
remoteFile- String The path to the remote file- Returns:
- boolean True if the file exists, false otherwise
- Throws:
unlimited.core.util.common.exception.FCException- If an error in the FC protocol occursjava.io.IOException- If a timeout, or other IO error occurs
-
serverSupportsUDP
public boolean serverSupportsUDP()
-
isFileCatalystServer
public boolean isFileCatalystServer()
True if it is a FileCatalyst Server. False if it is a 3PP server- Specified by:
isFileCatalystServerin interfaceunlimited.core.transfers.io.FCClientEngineBridge- Returns:
-
isFileCatalystServerPro
public boolean isFileCatalystServerPro()
True if is a PRO (non-UDP) FileCatalyst License.- Specified by:
isFileCatalystServerProin interfaceunlimited.core.transfers.io.FCClientEngineBridge- Returns:
-
isFileCatalystServerEnterprise
public boolean isFileCatalystServerEnterprise()
- Specified by:
isFileCatalystServerEnterprisein interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
binary
public void binary() throws java.io.IOException, unlimited.core.util.common.exception.FCException- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
setDownloadRate
public void setDownloadRate(int targetRate, int startRate) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionSets the target rate of the current transfer- Specified by:
setDownloadRatein interfaceunlimited.core.transfers.io.FCClientEngineBridge- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
sendTransmitRateCommand
protected void sendTransmitRateCommand(int targetRate, int startRate) throws java.io.IOException- Throws:
java.io.IOException
-
getFCClientObject
public FCClient getFCClientObject() throws unlimited.core.util.common.exception.FCException, java.io.IOException
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
reconnect
public void reconnect(boolean maintainCurrentDirectory) throws unlimited.core.util.common.exception.FCException, java.io.IOException- Specified by:
reconnectin interfaceunlimited.core.transfers.io.FCClientEngineBridge- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
chdir
public void chdir(java.lang.String dir) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionChange the remote working directory to that supplied- Parameters:
dir- name of remote directory to change to- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
refreshCachedPWD
protected void refreshCachedPWD(java.lang.String dir) throws java.io.IOException- Throws:
java.io.IOException
-
mkfile
public void mkfile(java.lang.String file) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionCreate the specified remote working directory- Parameters:
dir- name of remote directory to create- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
mkdir
public void mkdir(java.lang.String remotedir) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionCreate the specified remote working directory- Parameters:
dir- name of remote directory to create- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
mksig
public java.lang.String mksig(java.lang.String srcfile, java.lang.String uniqueID) throws java.io.IOException, unlimited.core.util.common.exception.FCException- Parameters:
srcfile-- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
mksig
public java.lang.String mksig(java.lang.String srcfile, boolean compress, java.lang.String uniqueID) throws java.io.IOException, unlimited.core.util.common.exception.FCException- Parameters:
srcfile- String Name of the source file.compress- boolean Compress flag for the signature. Default false (value currently ignored in v2.4.2)uniqueID- String Unique identifier for the delta transfer- Returns:
- String reply from target. if target < v2.4.2 will return: block size if target >= v2.4.2 will return: block size + " " + "unique file name"
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
mkdlt
public void mkdlt(java.lang.String srcfile, java.lang.String sigfile, int blockLength, boolean compress, int compLevel, int strategy) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionCalled by ReceiverHandler to create a delta file remotely. Legacy call -- pre v2.4.2. Does not include a UNIQUEID, so multiple concurrent delta calculations on the same file may corrupt it.- Parameters:
srcfile- Stringsigfile- StringblockLength- intcompress- booleancompLevel- intstrategy- int- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
mkdlt
public void mkdlt(java.lang.String srcfile, java.lang.String sigfile, int blockLength, boolean compress, int compLevel, int strategy, java.lang.String uniqueID, boolean waitForDeltaCreation) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionCalled by ReceiverHandler to create a delta file remotely. Uses UNIQUEID, to allow concurrent deltas to be created on the same file. v2.4.2+.- Parameters:
srcfile- Stringsigfile- StringblockLength- intcompress- booleancompLevel- intstrategy- intuniqueID- String- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
isDeltasStillGrowing
public boolean isDeltasStillGrowing() throws unlimited.core.util.common.exception.FCException, java.io.IOException- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
isZipStillGrowing
public boolean isZipStillGrowing(java.lang.String zipFileName) throws unlimited.core.util.common.exception.FCException, java.io.IOException- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
innerZipChunkTest
protected boolean innerZipChunkTest(java.lang.String zipFileName) throws unlimited.core.util.common.exception.FCException, java.io.IOException- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
isZipStillExtracting
public boolean isZipStillExtracting() throws unlimited.core.util.common.exception.FCException, java.io.IOException- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
rbfil
public java.lang.String rbfil(java.lang.String srcfile, java.lang.String deltafile, int blockLength, boolean compress, int level, boolean uniqueName) throws java.io.IOException, unlimited.core.util.common.exception.FCException- Parameters:
srcfile- Stringdeltafile- StringblockLength- intcompress- booleanlevel- intuniqueName- boolean- Returns:
- String The remote filename, may be the original destination, or a unique name.
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
rmdir
public void rmdir(java.lang.String dir) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionDelete the specified remote working directory- Parameters:
dir- name of remote directory to delete- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
serverPostProcess
public void serverPostProcess(java.lang.String file) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionExecute post processing on the specified file- Parameters:
file- The file on which to perform post processing- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
shouldPerformServerPostProcess
public boolean shouldPerformServerPostProcess()
-
rename
public void rename(java.lang.String from, java.lang.String to) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionRename a file or directory- Parameters:
from- name of file or directory to renameto- intended name- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
delete
public void delete(java.lang.String remoteFile) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionDelete the specified remote file- Parameters:
remoteFile- name of remote file to delete- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
deleteAll
public void deleteAll(java.util.List<java.lang.String> remoteFiles) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionBulk delete, deletes all the specified files in a single command. The server returns intermediate replies to keep the connection alive during a long delete- Parameters:
remoteFiles- files to delete- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
deleteAll
public void deleteAll(java.util.List<java.lang.String> remoteFiles, boolean ftpDelete) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionBulk delete, deletes all the specified files in a single command. The server returns intermediate replies to keep the connection alive during a long delete- Parameters:
remoteFiles- files to deleteftpDelete- use FTP style deletion, rejecting deletes on directories if they contain items- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
deleteAll
public void deleteAll(FileListData remoteFiles) throws unlimited.core.util.common.exception.FCException, java.io.IOException
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
deleteAll
public void deleteAll(FileListData remoteFiles, boolean ftpDelete) throws unlimited.core.util.common.exception.FCException, java.io.IOException
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
applyRemoteFileAttributesToLocalFile
public void applyRemoteFileAttributesToLocalFile(java.nio.file.Path localFile, java.lang.String remoteFile) throws java.io.IOException- Throws:
java.io.IOException
-
getMD5
public java.lang.String getMD5(java.lang.String remoteFile) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionRequest the MD5 digest of the remote file- Parameters:
remoteFile- name of remote file to delete- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
unzip
public void unzip(java.lang.String remoteFile, boolean maintainPermissions, boolean maintainTimeStamp) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionRequest that a file on the server be unzipped- Parameters:
remoteFile- name of remote file to unzip- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
buildUNZIPCommand
protected java.lang.String buildUNZIPCommand(java.lang.String remoteFile, boolean maintainPermissions, boolean maintainTimeStamp)
-
zip
public void zip(java.lang.String zipFilename, java.util.List<java.lang.String> remoteFiles) throws java.io.IOException, unlimited.core.util.common.exception.FCException- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
zip
public void zip(java.lang.String zipFilename, java.util.List<java.lang.String> remoteFiles, long zipSizeLimit) throws java.io.IOException, unlimited.core.util.common.exception.FCException- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
zip
public void zip(java.lang.String zipFilename, java.util.List<java.lang.String> remoteFiles, long zipSizeLimit, boolean waitForZipCreation, boolean needsRecurse) throws java.io.IOException, unlimited.core.util.common.exception.FCException- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
getMD5
public java.lang.String getMD5(java.lang.String remoteFile, long offset, long length) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionRequest the MD5 digest of the remote file- Parameters:
remoteFile- name of remote file to delete- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
getMD5
public java.lang.String getMD5(java.lang.String remoteFile, long offset, long length, long checkInterval, long checkLength) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionRequest the Partial MD5 digest of the remote file- Parameters:
remoteFile- name of remote file to delete- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
performSyncedMD5
protected java.lang.String performSyncedMD5(java.lang.String md5Command) throws java.io.IOException, unlimited.core.util.common.exception.FCException- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
performAsyncMD5
protected java.lang.String performAsyncMD5(java.lang.String md5Command) throws java.io.IOException- Throws:
java.io.IOException
-
dir
public FileListData dir(java.lang.String dirname, boolean full) throws java.io.IOException, unlimited.core.util.common.exception.FCException
List a directory's contents as an array of strings. A detailed listing is available, otherwise just filenames are provided. Note that a full listing can be used on a file name to obtain information about a file.- Parameters:
dirname- name of directory ( not a file mask)full- true if detailed listing required false otherwise- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
dirRaw
public java.lang.String[] dirRaw(java.lang.String dirname, boolean full, java.lang.String filterFlag) throws java.io.IOException, unlimited.core.util.common.exception.FCException- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
getDirListTool
protected DirListTool getDirListTool(DirListParams p, FCClientEngine e) throws unlimited.core.util.common.exception.FCException, java.io.IOException
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
dir
public FileListData dir(java.lang.String dirname, boolean full, java.lang.String filterFlag) throws java.io.IOException, unlimited.core.util.common.exception.FCException
List a directory's contents as an array of strings. A detailed listing is available, otherwise just filenames are provided. Note that a full listing can be used on a file name to obtain information about a file.- Parameters:
dirname- name of directory ( not a file mask)full- true if detailed listing required false otherwisefilterFlag- apply a filter flag (-f for files) to the dir command. Only valid when FULL is set to FALSE.- Returns:
- an array of directory listing strings
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
dir
public FileListData dir(java.lang.String dirname, boolean full, java.lang.String filterFlag, java.lang.String wildcard) throws java.io.IOException, unlimited.core.util.common.exception.FCException
List a directory's contents as an array of strings. A detailed listing is available, otherwise just filenames are provided. Note that a full listing can be used on a file name to obtain information about a file.- Parameters:
dirname- name of directory ( not a file mask)full- true if detailed listing required false otherwisefilterFlag- apply a filter flag (-f for files) to the dir command. Only valid when FULL is set to FALSE.wildcard- apply a wildcard to the list on server side to increase performance- Returns:
- an array of directory listing strings
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
doDirListing
protected FileListData doDirListing(java.lang.String dirname, boolean full, java.lang.String filterFlag, java.lang.String wildcard, FileListDataItemConsumer resultData) throws java.io.IOException, unlimited.core.util.common.exception.FCException, java.net.SocketException, java.io.UnsupportedEncodingException
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCExceptionjava.net.SocketExceptionjava.io.UnsupportedEncodingException
-
doDirListing
protected FileListData doDirListing(java.lang.String dirname, boolean full, java.lang.String filterFlag, java.lang.String wildcard, FileListDataItemConsumer resultData, java.util.function.BooleanSupplier isCancelled) throws java.io.IOException, unlimited.core.util.common.exception.FCException, java.net.SocketException, java.io.UnsupportedEncodingException
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCExceptionjava.net.SocketExceptionjava.io.UnsupportedEncodingException
-
doDirStream
public java.util.stream.Stream<FileListDataItem> doDirStream(java.lang.String dirname, boolean full, java.lang.String filterFlag, java.lang.String wildcard, FileListDataItemConsumer resultData, java.util.function.BooleanSupplier isCancelled) throws java.io.IOException, unlimited.core.util.common.exception.FCException, java.net.SocketException, java.io.UnsupportedEncodingException
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCExceptionjava.net.SocketExceptionjava.io.UnsupportedEncodingException
-
doDirStream
public java.util.stream.Stream<FileListDataItem> doDirStream(DirListParams params) throws unlimited.core.util.common.exception.FCException, java.io.IOException, java.net.SocketException, java.io.UnsupportedEncodingException
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOExceptionjava.net.SocketExceptionjava.io.UnsupportedEncodingException
-
rmdirRecursive
public void rmdirRecursive(FileListDataItem item) throws java.lang.Exception
Recursively delete a remote folder- Parameters:
item-- Throws:
java.lang.Exception
-
dir
public FileListData dir(java.lang.String dirname) throws java.io.IOException, unlimited.core.util.common.exception.FCException
List a directory's contents as an array of strings of filenames.- Parameters:
dirname- name of directory( not a file mask)- Returns:
- an array of directory listing strings
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
dir
public FileListData dir() throws java.io.IOException, unlimited.core.util.common.exception.FCException
List current directory's contents as an array of strings of filenames.- Returns:
- an array of current directory listing strings
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
sendEmail
public void sendEmail(java.lang.String emailAddress, int statusCode, java.lang.String note) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionInstruct the server to send an email to the administrator- Parameters:
email- the senders email addresscode- the constant code representing the transfer status- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
site
public boolean site(java.lang.String command) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionRun a site-specific command on the server. Support for commands is dependent on the server- Parameters:
command- the site command to run- Returns:
- true if command ok, false if command not implemented
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
size
public java.lang.String size(java.lang.String fileName, boolean bypassCache) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionGet the size of the named file from the remote server.- Specified by:
sizein interfaceunlimited.core.transfers.io.FCClientEngineBridge- Parameters:
fileName- name of the file- Returns:
- the size of the file
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
creationTime
public long creationTime(java.lang.String fileName) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionGet the creation time of the named file from the remote server.- Parameters:
fileName- name of the file- Returns:
- the creation time of the file (in millis)
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
accessTime
public long accessTime(java.lang.String fileName) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionGet the last access time of the named file from the remote server.- Parameters:
fileName- name of the file- Returns:
- the access time of the file (in millis)
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
getPlatForm
public java.lang.String getPlatForm() throws java.io.IOException- Throws:
java.io.IOException
-
getIdealConcurrentFTPStreams
public int getIdealConcurrentFTPStreams(int rate, long length, int bufferSize, int maxStream)- Specified by:
getIdealConcurrentFTPStreamsin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
getServerVersion
public java.lang.String getServerVersion()
-
prms
public java.lang.String[] prms(java.lang.String fileName) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionReturn the file permission of the file/directory listed in the argument from the remote server.- Parameters:
fileName- name of the file- Returns:
- permissions
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
resetTransferVariables
public void resetTransferVariables()
-
put
public void put(UploadTransferRequestData requestData) throws java.io.IOException, unlimited.core.util.common.exception.FCException
Put a local file onto the FileCatalyst server. It is placed in the current directory. Allows appending if current file exists- Parameters:
localPath- path of the local fileremoteFile- name of remote file in current directoryoutRate- sending bandwidthnumDFEncoders- number of DF encoders to be usedappend- true if appending, false otherwise- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
putIsFinished
public boolean putIsFinished()
-
getHTTP
public void getHTTP(DownloadTransferRequestData requestData) throws java.io.IOException, unlimited.core.util.common.exception.FCException, java.io.IOException
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
setOverrideServerBandwidth
public void setOverrideServerBandwidth(unlimited.core.transfers.io.ftptransfers.FTPTransmit transfer)
- Specified by:
setOverrideServerBandwidthin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
isTimeout
public final boolean isTimeout(java.lang.String message)
- Specified by:
isTimeoutin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
isChannelClosed
protected final boolean isChannelClosed(java.lang.String message)
-
getRemoteHost
protected java.lang.String getRemoteHost()
- Returns:
-
getLocalHost
protected java.lang.String getLocalHost()
- Returns:
-
detectSessionKilledByAdmin
protected void detectSessionKilledByAdmin()
-
sendRTTKeepALive
protected void sendRTTKeepALive()
-
gobbleExtraReplies
public void gobbleExtraReplies(int incomingTimeout, int incomingNumToGobble)- Specified by:
gobbleExtraRepliesin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
get
public void get(DownloadTransferRequestData downloadRequestData) throws java.io.IOException, unlimited.core.util.common.exception.FCException, java.security.NoSuchAlgorithmException, unlimited.core.util.common.exception.FCException, java.io.IOException
Get a file from the FileCatalyst server. It is placed in the current directory. Allows resuming if current file exists- Parameters:
localPath- path of the local fileremoteFile- name of remote file in current directoryoutRate- sending bandwidthnumDFEncoders- number of DF encoders to be usedappend- true if appending, false otherwise- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCExceptionjava.security.NoSuchAlgorithmException
-
createThirdPartyFTPServerDataConnection
public java.net.Socket createThirdPartyFTPServerDataConnection(java.lang.String command) throws java.io.IOException- Specified by:
createThirdPartyFTPServerDataConnectionin interfaceunlimited.core.transfers.io.FCClientEngineBridge- Throws:
java.io.IOException
-
isReportingEnabled
public boolean isReportingEnabled()
-
initFCTransfer
public int[] initFCTransfer(int numDecoders, int blockSize, int unitSize, long length, boolean congestionControl, int fileID, int mode) throws unlimited.core.util.common.exception.FCException, java.io.IOException- Specified by:
initFCTransferin interfaceunlimited.core.transfers.io.FCClientEngineBridge- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
update
public void update(java.util.Observable observable, java.lang.Object object)- Specified by:
updatein interfacejava.util.Observer- Parameters:
observable-object-
-
informServerToWriteReport
protected void informServerToWriteReport(PropertyTransmission reportArgs)
-
getReportStatus
public java.lang.String getReportStatus(unlimited.core.transfers.io.MonitoredTransfer monTransfer)
-
getReportStatus
public java.lang.String getReportStatus(MultiTransferHandler<?> monTransfer)
-
getTransferPercent
public int getTransferPercent()
- Specified by:
getTransferPercentin interfaceunlimited.core.transfers.TransferHandler- Returns:
- the current transfer completion percentage
-
getMeanEffectiveRate
public int getMeanEffectiveRate()
- Specified by:
getMeanEffectiveRatein interfaceunlimited.core.transfers.TransferHandler- Returns:
- the current transfer rate in Kbps
-
getBlastRate
public int getBlastRate()
2015/11/25 - leaving the comment below on what this returns, but noting that what it really returns is the mean average of total good data sent. So the method was renamed (via refactoring) and the original was put back to call renamed version ...- Returns:
- the current blast rate in Kbps
-
getTransferRate
public int getTransferRate()
-
getCurrentRate
public int getCurrentRate()
-
getCurrentGoodputRate
public int getCurrentGoodputRate()
-
getTransferGoodput
public long getTransferGoodput()
- Specified by:
getTransferGoodputin interfaceunlimited.core.transfers.TransferHandler- Returns:
- the number of useful bytes sent during current transfer
-
getTransferThroughput
public long getTransferThroughput()
- Specified by:
getTransferThroughputin interfaceunlimited.core.transfers.TransferHandler- Returns:
- the number of bytes sent during current transfer
-
isTransferComplete
public boolean isTransferComplete()
- Specified by:
isTransferCompletein interfaceunlimited.core.transfers.TransferHandler- Returns:
- true if the current transfer is complete
-
isTransferCancelled
public boolean isTransferCancelled()
- Specified by:
isTransferCancelledin interfaceunlimited.core.transfers.TransferHandler- Returns:
- true if a transfer was cancelled
-
isTransferError
public boolean isTransferError()
- Specified by:
isTransferErrorin interfaceunlimited.core.transfers.TransferHandler- Returns:
- true if an error occured dureing the transfer
-
cancelTransfer
public boolean cancelTransfer()
Cancels the current transfer, if one is occurring- Specified by:
cancelTransferin interfaceunlimited.core.transfers.TransferHandler
-
getTransferLength
public long getTransferLength()
- Specified by:
getTransferLengthin interfaceunlimited.core.transfers.TransferHandler- Returns:
- the length of the file currently being transferred
-
setBandwidth
public int setBandwidth(int bandwidth)
-
setBandwidthRemoteTransfer
protected void setBandwidthRemoteTransfer(int bandwidth)
-
setBandwidthFTPReceiver
protected int setBandwidthFTPReceiver(int bandwidth)
-
setBandwidthFTPTransmit
protected int setBandwidthFTPTransmit(int bandwidth, unlimited.core.transfers.io.MonitoredTransfer monitoredTransfer)
-
setBandwidthUPDReceiver
protected int setBandwidthUPDReceiver(int bandwidth)
-
setBandwidthUDPSender
protected int setBandwidthUDPSender(int bandwidth)
-
setCongestionControl
public void setCongestionControl(boolean congestionControl)
-
getStartRate
public int getStartRate()
-
setStartRate
public void setStartRate(int startRate)
-
isCongestionControl
public boolean isCongestionControl()
-
getNumFTPStreams
public int getNumFTPStreams()
-
isUseCompression
public boolean isUseCompression()
- Specified by:
isUseCompressionin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
getCompStrategy
public int getCompStrategy()
- Specified by:
getCompStrategyin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
getCompMethod
public int getCompMethod()
-
getCompLevel
public int getCompLevel()
- Specified by:
getCompLevelin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
isAllowConnectNonFileCatalystServer
public boolean isAllowConnectNonFileCatalystServer()
-
getWelcomeMessage
public java.lang.String getWelcomeMessage()
-
getClientIdentifier
public int getClientIdentifier()
-
getCongestionControlAggression
public int getCongestionControlAggression()
-
setNumFTPStreams
public void setNumFTPStreams(int numFTPStreams)
-
setUseCompression
public void setUseCompression(boolean useCompression)
-
setCompMethod
public void setCompMethod(int compMethod)
-
setCompLevel
public void setCompLevel(int compLevel)
-
setCompStrategy
@Deprecated public void setCompStrategy(int compStrategy)
Deprecated.We no longer support setting compression strategy.- Parameters:
compStrategy-
-
setReadTimeoutLong
public void setReadTimeoutLong(int millisecs)
This is the timeout value that get set when we are sending commands that take long to execute, MD5, MKDLT, etc...- Parameters:
millisecs- int
-
setWelcomeMessage
public void setWelcomeMessage(java.lang.String welcomeMessage)
-
setClientIdentifier
public void setClientIdentifier(int clientIdentifier)
-
setCongestionControlAggression
public void setCongestionControlAggression(int congestionControlAggression)
-
addClientConnectKey
public void addClientConnectKey(java.lang.String key)
-
getNumUDPSockets
public int getNumUDPSockets()
- Returns:
- the numUDPSockets
-
setNumUDPSockets
public void setNumUDPSockets(int numUDPSockets)
- Parameters:
numUDPSockets- the numUDPSockets to set
-
getPacketLoss
public double getPacketLoss()
- Specified by:
getPacketLossin interfaceunlimited.core.transfers.TransferHandler
-
getCurrentRTT
public int getCurrentRTT()
-
isForceTCPmodeACKs
public boolean isForceTCPmodeACKs()
- Returns:
- the forceTCPmodeACKs
-
setForceTCPmodeACKs
public void setForceTCPmodeACKs(boolean forceTCPmodeACKs)
- Parameters:
forceTCPmodeACKs- the forceTCPmodeACKs to set
-
getServerAgentID
public java.lang.String getServerAgentID()
- Specified by:
getServerAgentIDin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
getClientAgentID
public java.lang.String getClientAgentID()
- Specified by:
getClientAgentIDin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
setClientAgentID
public void setClientAgentID(java.lang.String clientAgentID)
- Specified by:
setClientAgentIDin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
getSessionID
public java.lang.String getSessionID()
- Specified by:
getSessionIDin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
getClientSubIdentifier
public int getClientSubIdentifier()
- Specified by:
getClientSubIdentifierin interfaceunlimited.core.transfers.io.FCClientEngineBridge- Returns:
- the clientSubIdentifier
-
setClientSubIdentifier
public void setClientSubIdentifier(int clientSubIdentifier)
The sub identifier identifies this client as a sub component of a broader group of client apps. For example, client id 9 means FC Web, but doesn't indicate which applet is connecting. Or CLI identifier doesn't let you know if its Java or C++ CLI.- Specified by:
setClientSubIdentifierin interfaceunlimited.core.transfers.io.FCClientEngineBridge- Parameters:
clientSubIdentifier- the clientSubIdentifier to set
-
getClientString
public java.lang.String getClientString()
- Specified by:
getClientStringin interfaceunlimited.core.transfers.io.FCClientEngineBridge- Returns:
- the clientString
-
setClientString
public void setClientString(java.lang.String clientString)
The client string provides additional information about the connecting client. For example in FC Web only one user account is used in Direct server. This value lets FC Web clients identify which FC Web user id is being used.- Specified by:
setClientStringin interfaceunlimited.core.transfers.io.FCClientEngineBridge- Parameters:
clientString- the clientString to set
-
setReportManager
public void setReportManager(FCClientReportManager reporter)
-
getReportManager
public FCClientReportManager getReportManager()
Returns the report manager that is used to encapsulate all reporting functionality into one single resource- Returns:
- ReportManager object that allows individuals to perform reporting logic
-
getReporter
public unlimited.fc.reporting.ClientDataReport getReporter()
- Specified by:
getReporterin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
hasReporter
public boolean hasReporter()
- Specified by:
hasReporterin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
setClientName
public void setClientName(java.lang.String clientName)
- Parameters:
clientName- the clientName to set
-
setClientWorkingPath
public void setClientWorkingPath(java.nio.file.Path clientWorkingPath)
- Parameters:
clientName- the hotFolderName to setclientWorkingPath- TODO
-
getServletLocation
public java.lang.String getServletLocation()
- Returns:
- the servletLocation
-
setServletLocation
public void setServletLocation(java.lang.String servletLocation)
- Parameters:
servletLocation- the servletLocation to set
-
isHttp
public boolean isHttp()
- Returns:
- the http
-
setHttp
public void setHttp(boolean http)
- Parameters:
http- the http to set
-
getTransferSettings
public unlimited.core.transfers.io.udptransfers.UDPTransferSettings getTransferSettings()
- Specified by:
getTransferSettingsin interfaceunlimited.core.transfers.io.FCClientEngineBridge- Returns:
- the transferSettings
-
setProgressiveTransfer
public void setProgressiveTransfer(boolean isProgressive)
This state is needed to suppress or allow a user data report to be written when the transfer completes. The transfer handler has this info. It should probably go into the transfer settings object.
-
isProgressiveTransfer
public boolean isProgressiveTransfer()
-
setTransferSettings
public void setTransferSettings(unlimited.core.transfers.io.udptransfers.UDPTransferSettings transferSettings)
- Parameters:
transferSettings- the transferSettings to set
-
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- Returns:
- UDPTransferMetricsContainer
-
getRemoteServiceVersion
public unlimited.core.util.common.version.RemoteServiceVersion getRemoteServiceVersion()
Returns the remote service version of the server.- Specified by:
getRemoteServiceVersionin interfaceunlimited.core.util.common.version.KnowsRemoteServiceVersionInterface- Returns:
-
remoteTransferInitiate
public void remoteTransferInitiate(ServerToServerTransferSettings settings) throws java.io.IOException, unlimited.core.util.common.exception.FCException
Initiate a- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
createPatch
public java.lang.String createPatch(java.lang.String remoteFile, long offset, long length) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionCreates a new patch file on the remote server that contains the bytes from offset to offeset+length of remoteFile- Parameters:
remoteFile-offset-length-- Returns:
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
applyPatch
public void applyPatch(java.lang.String remoteFile, java.lang.String remotePatch, long offset) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionApplies a patch file on the remote server to the specified file at the specified offset- Parameters:
remoteFile-remotePatch-offset-- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
remoteTransferStatus
public java.lang.String remoteTransferStatus() throws unlimited.core.util.common.exception.FCException, java.io.IOException- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
zipErrors
public boolean zipErrors() throws java.io.IOException- Throws:
java.io.IOException
-
testApproximateUploadSpeed
public int testApproximateUploadSpeed() throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionPerforms a quick test to determine the approximate upload speed to the connected server.- Returns:
- int the rate detected in Kbps
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
testApproximateDownloadSpeed
public int testApproximateDownloadSpeed() throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionPerforms a quick test to determine the approximate download speed to the connected server.- Returns:
- int the rate detected in Kbps
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
testMaximumUploadSpeed
public int testMaximumUploadSpeed() throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionPerforms a quick test to determine the approximate upload speed to the connected server.- Returns:
- int the rate detected in Kbps
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
testMaximumDownloadSpeed
public int testMaximumDownloadSpeed() throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionPerforms a quick test to determine the approximate download speed to the connected server.- Returns:
- int the rate detected in Kbps
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
monitorIsNull
public boolean monitorIsNull()
-
getSessionCount
public int getSessionCount()
-
isLoggedIn
public boolean isLoggedIn()
-
setVerifyMode
public void setVerifyMode(int verifyMode)
-
overrideSessionID
public void overrideSessionID(java.lang.String sessionID)
-
isComplete
public boolean isComplete()
-
streamWithInlineParse
public java.util.stream.Stream<FileListDataItem> streamWithInlineParse(java.lang.String directory, FCClient fcClient) throws unlimited.core.util.common.exception.FCException, java.net.SocketException, java.io.UnsupportedEncodingException, java.io.UncheckedIOException, java.io.IOException
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.net.SocketExceptionjava.io.UnsupportedEncodingExceptionjava.io.UncheckedIOExceptionjava.io.IOException
-
streamWithInlineParse
public java.util.stream.Stream<FileListDataItem> streamWithInlineParse(java.lang.String directory, FCClient fcClient, java.util.function.BooleanSupplier isCancelled) throws unlimited.core.util.common.exception.FCException, java.net.SocketException, java.io.UnsupportedEncodingException, java.io.UncheckedIOException, java.io.IOException
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.net.SocketExceptionjava.io.UnsupportedEncodingExceptionjava.io.UncheckedIOExceptionjava.io.IOException
-
streamWithInlineParse
public java.util.stream.Stream<FileListDataItem> streamWithInlineParse(java.lang.String directory, java.util.function.BooleanSupplier isSynched, java.lang.AutoCloseable closer) throws unlimited.core.util.common.exception.FCException, java.net.SocketException, java.io.UnsupportedEncodingException, java.io.UncheckedIOException, java.io.IOException
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.net.SocketExceptionjava.io.UnsupportedEncodingExceptionjava.io.UncheckedIOExceptionjava.io.IOException
-
streamWithInlineParse
public java.util.stream.Stream<FileListDataItem> streamWithInlineParse(java.lang.String directory, java.util.function.BooleanSupplier isSynched, java.lang.AutoCloseable closer, java.util.function.BooleanSupplier isCancelled) throws unlimited.core.util.common.exception.FCException, java.net.SocketException, java.io.UnsupportedEncodingException, java.io.UncheckedIOException, java.io.IOException
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.net.SocketExceptionjava.io.UnsupportedEncodingExceptionjava.io.UncheckedIOExceptionjava.io.IOException
-
exists
public unlimited.core.util.common.AutoClose<unlimited.core.util.common.stream.PairStream<java.lang.String,java.lang.Boolean>> exists(java.util.stream.Stream<java.lang.String> nameStream)
-
remoteSynchFile
public java.util.stream.Stream<FileListDataItem> remoteSynchFile(java.util.stream.Stream<FileListDataItem> itemStream)
-
getUserEmail
public java.lang.String getUserEmail() throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionReturns The User's Email Address When Requested- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
setUserEmail
public void setUserEmail(java.lang.String newEmail) throws java.io.IOExceptionSets the user's email address- Parameters:
newEmail- - The New Email Address To Be Set- Throws:
java.io.IOException
-
getUserFullName
public java.lang.String getUserFullName() throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionGathers The Full Name Of The User- Returns:
- - The Full Name Of The User
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
setUserFullName
public void setUserFullName(java.lang.String newName) throws unlimited.core.util.common.exception.FCException, java.io.IOException- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
getUserPermissions
public UserPermissionsContainer getUserPermissions() throws unlimited.core.util.common.exception.FCException, java.io.IOException
Gathers The User's Permissions From The Server- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
sendWeblink
public WeblinkResult sendWeblink(WeblinkDataContainer linkDO) throws unlimited.core.util.common.exception.FCException, java.io.IOException
Creates A Weblink From The Data Container Given- Parameters:
linkDO- - Data Container Containing Data For The Link- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
validateLinkDataContainer
protected void validateLinkDataContainer(WeblinkDataContainer linkDO) throws unlimited.core.util.common.exception.FCException
- Throws:
unlimited.core.util.common.exception.FCException
-
buildWeblinkCommand
protected java.lang.String buildWeblinkCommand(WeblinkDataContainer linkDO)
-
sendJobStatus
public void sendJobStatus(TransferStatusEnum status) throws unlimited.core.util.common.exception.FCException, java.io.IOException
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
isLinkEnabledOnServer
public boolean isLinkEnabledOnServer() throws unlimited.core.util.common.exception.FCException, java.io.IOException- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
getServerLinkExpiryDayValue
public int getServerLinkExpiryDayValue() throws unlimited.core.util.common.exception.FCException, java.io.IOException- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
getServerConfigurationValue
public java.lang.String getServerConfigurationValue(java.lang.String request) throws unlimited.core.util.common.exception.FCException, java.io.IOException- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
getAllServerClientConfigs
public ServerConfigs getAllServerClientConfigs() throws unlimited.core.util.common.exception.FCException, java.io.IOException
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
getCachedPWD
public java.lang.String getCachedPWD()
-
getIsTransferringData
public boolean getIsTransferringData()
-
updateReportWriter
public void updateReportWriter(java.lang.String transferType, java.lang.String transferDirection, long size, java.nio.file.Path localFile)- Specified by:
updateReportWriterin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
getTransmitZipRatio
public float getTransmitZipRatio()
-
setSessionPriority
public void setSessionPriority(int priority)
-
lastServerRestrictedRate
public int lastServerRestrictedRate()
-
isServerBandwidthOverride
public boolean isServerBandwidthOverride()
-
getHashCode
public com.google.common.hash.HashCode getHashCode()
-
getTransferID
public int getTransferID()
- Specified by:
getTransferIDin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
getForceFileOwnerConfig
public unlimited.core.util.common.forceFileOwnership.ForceFileOwnershipConfig getForceFileOwnerConfig()
- Specified by:
getForceFileOwnerConfigin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
syncFileType
public void syncFileType(FileListDataItem aFile)
-
registerReportListener
public void registerReportListener(MultiTransferHandler<?> mth)
-
getAutoDetectData
public AutoDetectData getAutoDetectData()
-
hasAutoDetectData
public boolean hasAutoDetectData()
-
setAutoDetectData
public void setAutoDetectData(FCClient fcClient)
-
getSpeedcache
public static FCClienEngineSpeedCache getSpeedcache()
-
ctrlClient
public unlimited.core.transfers.io.FCClientControlSocketBridge ctrlClient()
- Specified by:
ctrlClientin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
numFTPStreams
public int numFTPStreams()
- Specified by:
numFTPStreamsin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
numFTPStreams
public void numFTPStreams(int streams)
- Specified by:
numFTPStreamsin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
lastValidReply
public void lastValidReply(unlimited.core.transfers.io.FCReply validateReply)
- Specified by:
lastValidReplyin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
lastValidReply
public unlimited.core.transfers.io.FCReply lastValidReply()
- Specified by:
lastValidReplyin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
close
public void close() throws java.lang.Exception- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.lang.Exception
-
isAborted
public void isAborted(boolean isAborted)
- Specified by:
isAbortedin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
abortAck
public void abortAck(boolean abortAck)
- Specified by:
abortAckin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
getDone
public boolean getDone()
- Specified by:
getDonein interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
getDone
public void getDone(boolean isDone)
- Specified by:
getDonein interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
readTimeout
public int readTimeout()
- Specified by:
readTimeoutin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
readTimeout
public void readTimeout(int readTimeout)
- Specified by:
readTimeoutin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
putDone
public void putDone(boolean putDone)
- Specified by:
putDonein interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
putDone
public boolean putDone()
- Specified by:
putDonein interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
waitingForAbortAck
public void waitingForAbortAck(boolean waitingForAbortAck)
- Specified by:
waitingForAbortAckin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
setSslSocketProducer
public void setSslSocketProducer(unlimited.core.util.common.net.ssl.FCSSLSocketProducerImpl sslSocketProducer)
- Specified by:
setSslSocketProducerin interfaceunlimited.core.transfers.io.FCClientEngineBridge
-
setCurrentFilesMatch
public void setCurrentFilesMatch(FilesMatch filesMatch)
-
-