Class CreatedState
- java.lang.Object
-
- unlimited.fc.client.api.multiclient.MultiClientState
-
- unlimited.fc.client.api.multiclient.CreatedState
-
- Direct Known Subclasses:
InitializedState,InitializedState.DisconnectingState,InitializedState.Transition
public class CreatedState extends MultiClientState
The Class CreatedState.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class unlimited.fc.client.api.multiclient.MultiClientState
MultiClientState.StateMachineException
-
-
Field Summary
-
Fields inherited from class unlimited.fc.client.api.multiclient.MultiClientState
cause, parent
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCreatedState(MultiClientState oldState)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidaddCustomLogHandler(java.util.logging.Handler handler)Adds a custom log handler to which API logs will be published.protected voidapplyRemoteFileAttributesToLocalFile(java.nio.file.Path localFile, java.lang.String remoteFile)Applies the remote file attributes to the local file instance.protected voidautoDetectConectionMode()protected voidautoDetectConectionModeDownload()This method will attempt to detect the optimal connection method based on the provided server information, HTTP servlet location, and ports.protected voidautoDetectConectionModeDownload(boolean testUDP, boolean portFallback)This method will attempt to detect the optimal connection method based on the provided server information, HTTP servlet location, and ports.protected voidautoDetectConectionModeUpload()This method will attempt to detect the optimal connection method based on the provided server information, HTTP servlet location, and ports.protected voidautoDetectConectionModeUpload(boolean testUDP, boolean portFallback)This method will attempt to detect the optimal connection method based on the provided server information, HTTP servlet location, and ports.protected voidautoDetectConectionModeUploadAndDownload()This method will attempt to detect the optimal connection method based on the provided server information, HTTP servlet location, and ports.protected voidautoDetectConectionModeUploadAndDownload(boolean portFallback)This method will attempt to detect the optimal connection method based on the provided server information, HTTP servlet location, and ports.protected voidcd(java.lang.String path)Navigates the manager into the supplied path.protected voidcdup()Move up one directory on the remote directory structure.protected voidconnect()Connect to the FileCatalyst server.protected voiddelete(java.lang.String file)Deletes the specified file from the remote file system.protected voiddeleteAll(java.util.List files)Delete all specified files in a single efficient command.protected voiddeleteAll(FileListData files)Delete all specified files in a single efficient command.protected voiddeleteAll(FileListDataItem[] files)Delete all specified files in a single efficient command.protected voiddisconnect()Disconnect from the server.protected voiddoJob(TransferRunner runner)protected TransferHookdownload(java.lang.String remoteFile)Download a the specified file to the current local working directory.protected TransferHookdownload(java.lang.String remoteFile, java.lang.String localPath)Download the specified file to the specified local path.protected TransferHookdownload(java.util.List<java.lang.String> files)Downloads the files as specified by the paths (in String format) contained in the specified vector to the current working directory.protected TransferHookdownload(java.util.List<java.lang.String> files, java.lang.String localPath)Download the specified file to the specified local file.protected TransferHookdownload(java.util.List<java.lang.String> files, java.lang.String localPath, java.lang.String transferUniqueID, boolean needsRecurse)Downloads the files as specified by the paths (in String format) contained in the specified vector to the current working directory.protected TransferHookdownload(FileListData files)Downloads the files specified in the FileListData object to the current local working directory.protected TransferHookdownload(FileListData files, java.lang.String localPath, java.lang.String transferUniqueID, boolean needsRecurse)Downloads the files specified in the FileListData object to the specified path.protected TransferHookdownloadAs(FileListDataItem remoteFile, java.nio.file.Path localFile, java.lang.String transferUniqueID)Download the specified file to the specified local file.protected voiddownloadRange(java.nio.file.Path localFile, java.lang.String remoteFile, long offset, long length)Downloads a range of rate for the given fileprotected voiddownloadStream(java.util.stream.Stream<FileListDataItem> stream)protected 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.protected 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> remoteFile)Test if the remote file, denoted by the given remote path, exists on the server and returns true if it exists, false otherwise.protected booleanfilesMatch(java.nio.file.Path file, java.lang.String rFile, int md5RateLimit, unlimited.core.util.common.CancelHandler cancelHandler)Verifies whether a local file matches a remote file using MD5 checksumprotected java.util.List<FileSystemEvent>fileSystemEvents(long timeout)Returns the file system events, (if any I assume).protected voidfinish()Cleans up memory allocated by the native libraries component of FileCatalyst.protected voidflushCaches()Deletes underlying caches for file sizes and date/time stampsprotected voidfsEvents()Prints out a list of the current file system events that are set on the server.protected voidget(java.lang.String localPath, java.lang.String remoteFile, int inRate, long offset, long size, int numDFEncoders, int blockSize, int unitSize, int mode)ServerConfigsgetAllAvailableServerConfigs()Request if link is enabled on the server that you are connected tooprotected intgetBlastRate()protected intgetBlockSize()protected FileCatalystClientCallbackHandlergetCallbackHandler()Returns the current callback handlerprotected java.lang.StringgetClientConnectKey()protected java.util.function.Supplier<ClientCredentials>getClientCredentials()protected java.lang.StringgetClientName()protected java.lang.StringgetCompFileFilter()protected intgetCongCtrlStrategy()protected intgetCongestionControlAggression()protected ConnectivityTestResultContainergetConnectivityTestResults()Returns a data container object that contains information about whether or not uploads, downloads or overall transfers will workprotected intgetConnectTimeout()protected TransferMechanismDatagetData()protected intgetExtendedReadTimeout()protected FileCatalystFileFiltergetFileFilter()voidgetHandledBy(StateHandler handler)Gets the handled by.java.lang.StringgetHumanReadableName()Returns a human readable name for the state.protected intgetIncomingDataPort()protected int[]getIncomingDataPorts()protected intgetIncrementalMode()protected java.lang.StringgetLocalWorkingDirectory()protected unlimited.core.util.common.logs.LogUtilsgetLogger()protected java.lang.StringgetLogLocation()protected intgetMaxRetries()protected java.lang.StringgetMD5(java.lang.String remote)Returns the MD5 checksum for the specified remote file if it existsprotected java.lang.StringgetMD5Checksum(java.lang.String rFile)Returns the MD5 checksum for the given remote fileprotected intgetMd5RateLimit()protected intgetMode()protected intgetNumBlockReaders()Returns the number of block readersprotected intgetNumBlockWriters()protected intgetNumFTPStreams()protected intgetNumPacketProcessors()protected intgetNumReceiveSockets()protected intgetNumSenderSockets()protected intgetNumSenderThreads()protected intgetNumThreads()protected intgetNumUDPSockets()protected java.util.ObservergetObserver()protected intgetPacketQueueDepth()protected intgetPacketSize()protected java.lang.StringgetPostURL()protected intgetProgressiveTimeout()protected java.lang.StringgetProgressiveTimeoutFilter()protected intgetReadBufferSizeKB()Returns the read buffer size in KBprotected intgetReadTimeout()protected intgetRemotePort()protected java.lang.StringgetRemoteServer()protected booleangetRenameExtension()protected java.lang.StringgetServerAgentID()java.lang.StringgetServerConfigurationValue(java.lang.String value)Request if link is enabled on the server that you are connected tooprotected java.lang.StringgetServletLocation()protected intgetServletMultiplier()protected intgetSessionCount()protected intgetStartRate()protected booleangetTransferEmptyDirectories()protected intgetTransferRate()protected intgetUnitSize()protected java.lang.StringgetUserEmailAddress()Get The User's Email Address When Calledprotected java.lang.StringgetUserFullName()Get The User's Full Name When Calledprotected UserPermissionsContainergetUserPermissions()Gather's the user's permissionsprotected intgetVerifyMode()protected longgetWaitRetry()protected intgetWriteBufferSizeKB()Returns the write buffer sizeprotected java.lang.StringgetWriteFileMode()Gets the write file mode when calledprotected voidinitialize(boolean generateUserLogs)Initialize Multi-Client object.protected voidinitializeNoUserLogs()Initializes the TransferMechanism with no user logsprotected voidinitSession()protected booleanisAutoResume()protected booleanisAutoUnzip()protected booleanisCancelled()protected booleanisCongestionControlEnabled()protected booleanisDebug()protected booleanisDeleteAfterTransfer()protected booleanisDowngradeModeOnReConnect()Returns whether or not the state is set to downgrade mode on reconnectprotected booleanisFileCatalystServer()Returns true if connected to a FileCatalyst server.protected booleanisForceTCPmodeACKs()booleanisLinkEnabledOnServer()Request if link is enabled on the server that you are connected tooprotected booleanisMaintainLastModified()protected booleanisMaintainPermissions()protected booleanisOptimizeBlockSize()protected booleanisProgressiveTransfers()protected booleanisShowConsoleLog()protected booleanisTransferEmptyDirectories()protected booleanisTransferWithTempName()protected booleanisUDPSupported()Returns true if connected to a FileCatalyst server that supports UDP.protected booleanisUseCongestionControl()protected booleanisUseSSL()protected booleanisVerifyIntegrity()protected voidjobPushed(TransferJob job)Pushes a TransferJob into the Multi-Client for transfer.protected FileListDatalist()Returns meta data for files in the current remote directory.protected FileListDatalist(java.lang.String wildcard)Returns meta data for files in the current remote directory.protected FileListDatalist(java.lang.String wildcard, java.lang.String remoteDirectory)Returns meta data for files in the remote directory.FileListDatalistNoParse(java.lang.String directory)protected FileListDatalistRecursiveFTPCompatible(java.lang.String directory)This is a ftp compatible listWithInlineParse();protected FileListDatalistWithInlineParse()Returns meta data for files in the current remote directory.protected FileListDatalistWithInlineParse(java.lang.String directory)Returns meta data for files in the given remote directory.protected voidlogin(java.util.function.Supplier<ClientCredentials> creds)Login to the server with the specifed credentials.protected voidmkdir(java.lang.String dir)Creates the specified directory on the remote file system.protected voidmodtime(FileListDataItem item)This will update the modtime of the file existing on the server to whatever the incoming FileListDataItem is set toprotected voidnoop()protected voidpreProcess(TransferJob job)Preprocess the job with all of the preprocess that are currently setprotected java.lang.String[]prms(java.lang.String filename)Return the file permission of the file/directory listed in the argument from the remote server.protected MultiClientTransferHookpushJob(TransferJob job)protected MultiClientTransferHookpushJobNoProcessing(TransferJob job)Pushes a TransferJob into the Multi-Client for transfer.protected java.lang.Stringpwd()protected java.lang.Stringquote(java.lang.String command)Issue arbitrary FileCatalyst commands to the FileCatalyst server.protected java.util.stream.Stream<FileListDataItem>remoteSynchFile(java.util.stream.Stream<FileListDataItem> fileStream)protected voidremoteSynchFile(FileListDataItem aFile)This is useful for progressive downloads when the updated value of the FileListData is required.protected TransferHookremoteUpload(FCClient destServer, java.lang.String sourceFile, java.lang.String destFile)This method will initiate an upload from the server to which this FCClient object (Server A) is connected to the server specified by the destServer parameter passed in (Server B).protected TransferHookremoteUpload(FCClient destServer, java.util.List<java.lang.String> sourceFiles, java.util.List<java.lang.String> destFiles)This method will initiate an upload from the server to which this FCClient object (Server A) is connected to the server specified by the destServer parameter passed in (Server B).protected voidrename(java.lang.String oldName, java.lang.String newName)Renames the specified file to the new name.protected voidresetAutoDetectInfo()Resets all Auto-detect informationprotected voidresetSession()protected voidrmdir(java.lang.String dir)Deletes the specified directory from the remote file system.protected voidrmdirRecursive(FileListDataItem fileListDataItem)Deletes a directory on the server in a recursive manner.voidrunWorkerClient(FileTransferMechanismHandler handler)protected WeblinkResultsendWeblink(java.util.List<java.lang.String> to, java.lang.String from, java.lang.String message, java.util.Set<java.lang.String> files)Deprecated.protected WeblinkResultsendWeblink(WeblinkDataContainer dataDO)Creates a weblink with the parameters provided by the client.protected java.lang.StringserverVersion()Returns the FileCatalyst server version.protected voidsetAutoResume(boolean autoResume)protected voidsetAutoUnzip(boolean autoUnzip)protected voidsetBlockSize(int blockSize)protected voidsetCallbackHandler(FileCatalystClientCallbackHandler callbackHandler)Sets the current call back handler when calledprotected voidsetCancelled()protected voidsetClientAgentID(java.lang.String clientAgentID)protected voidsetClientConnectKey(java.lang.String clientConnectKey)protected voidsetClientCredentials(java.util.function.Supplier<ClientCredentials> creds)protected voidsetClientIdentifier(int clientIdentifier)protected voidsetClientName(java.lang.String clientName)protected voidsetClientString(java.lang.String clientString)protected voidsetClientSubIdentifier(int clientSubIdentifier)protected voidsetClientWorkingPath(java.nio.file.Path clientWorkingPath)protected voidsetCompFileFilter(java.lang.String compFileFilter)protected voidsetCongCtrlStrategy(int congCtrlStrategy)protected voidsetCongestionControlAggression(int congestionControlAggression)protected voidsetCongestionControlEnabled(boolean enabled)protected voidsetConnectTimeout(int millisec)protected voidsetDebug(boolean debug)protected voidsetDeleteAfterTransfer(boolean deleteAfterTransfer)protected voidsetDowngradeModeOnReConnect(boolean downgradeModeOnReConnect)protected voidsetExtendedReadTimeout(int millisecs)protected voidsetFileFilter(FileCatalystFileFilter filter)protected voidsetFileTransferPriority(int priority)protected voidsetForceFileOwnershipEnabled(boolean isForceFileOwnershipEnabled)protected voidsetForceFileOwnershipGroup(java.lang.String forceFileOwnershipGroup)protected voidsetForceFileOwnershipUser(java.lang.String forceFileOwnershipUser)protected voidsetForceTCPmodeACKs(boolean forceTCPmodeACKs)protected voidsetIncomingDataPort(int inDataPort)protected voidsetIncomingDataPorts(int[] inDataPorts)protected voidsetIncrementalMode(int incrementalMode)voidsetIncrementalSizeCheckOnly(boolean incrementalSizeCheckOnly)protected voidsetLocalWorkingDirectory(java.nio.file.Path localWorkingDirectory)protected voidsetLogger(unlimited.core.util.common.logs.LogUtils logger)protected java.lang.ThrowablesetLoggerAttempt(unlimited.core.util.common.logs.LogUtils logger)protected voidsetLogLocation(java.lang.String logLocation)voidsetLogPrefix(java.lang.String logPrefix)Sets the prefix of the log files to whatever value is suppliedprotected voidsetMaintainLastModified(boolean maintainLastModified)protected voidsetMaintainPermissions(boolean maintainPermissions)protected voidsetMaxRetries(int maxRetries)protected voidsetMd5RateLimit(int md5RateLimit)protected voidsetMode(int mode)protected voidsetNumBlockReaders(int numBlockReaders)protected voidsetNumBlockWriters(int numBlockWriters)protected voidsetNumFTPStreams(int numFTPStreams)protected voidsetNumPacketProcessors(int numPacketProcessors)protected voidsetNumReceiveSockets(int numReceiveSockets)protected voidsetNumSenderSockets(int numSenderSockets)protected voidsetNumSenderThreads(int numThreads)protected voidsetNumThreads(int numThreads)protected voidsetNumUDPSockets(int numUDPSockets)protected voidsetObserver(java.util.Observer observer)protected voidsetOptimizeBlockSize(boolean optimizeBlockSize)protected voidsetPacketQueueDepth(int packetQueueDepth)protected voidsetPacketSize(int packetSize)protected voidsetPostTaskSentData(PostTaskSentData data)protected voidsetPostURL(java.lang.String postURL)protected voidsetProgressiveTimeout(int progressiveTimeout)protected voidsetProgressiveTimeoutFilter(java.lang.String progressiveTimeoutFilter)protected voidsetProgressiveTransfers(boolean progressiveTransfers)protected voidsetReadBufferSizeKB(int bufferSizeKB)Sets the read buffer size to the value suppliedprotected voidsetReadTimeout(int millisecs)protected voidsetRemotePort(int remotePort)protected voidsetRemoteServer(java.lang.String remoteServer)protected voidsetRenameExtension(boolean renameExtension)voidsetReport(unlimited.fc.reporting.ClientDataReport reporter)Sets the report object.protected voidsetServletLocation(java.lang.String servletLocation)protected voidsetServletLocation(java.lang.String servletLocation, java.lang.String servletSessionID, java.lang.String welcomeMessage)protected voidsetServletMultiplier(int servletMultiplier)protected voidsetSessionID(java.lang.String sessionID)protected voidsetShowConsoleLog(boolean showConsoleLog)protected voidsetSSLSocketProducer(unlimited.core.util.common.net.ssl.FCSSLSocketProducerImpl socketProducer)protected voidsetStartRate(int slowStartRate)protected voidsetTargetRate(int targetRate, BandwidthDistributionMode skipOverrides)protected voidsetTaskID(java.lang.String taskID)protected voidsetTransactionID(java.lang.String uniqueID)protected voidsetTransferEmptyDirectories(boolean transferEmptyDirectories)protected voidsetTransferMode()protected voidsetTransferToServerOverride(int serverOverrideBW)protected voidsetTransferWithTempName(boolean transferWithTempName)protected voidsetTransferWithTempName(boolean transferWithTempName, int tempMode)protected voidsetUnitSize(int unitSize)protected voidsetUseCongestionControl(boolean useCongestionControl)protected voidsetUserEmailAddress(java.lang.String newEmailAddress)Sets The User's Email Address When Calledprotected voidsetUserFullName(java.lang.String newFullName)Set's The User's Name When CalledvoidsetUserRelativePriority(int priority)protected voidsetUseSSL(boolean useSSL)protected voidsetVerifyIntegrity(boolean verifyIntegrity)protected voidsetVerifyMode(int verifyMode)protected voidsetWaitRetry(long waitRetry)protected voidsetWriteBufferSizeKB(int bufferSizeKB)Set the write buffer sizeprotected voidsetWriteFileMode(java.lang.String mode)Set the write file modeprotected longsize(java.lang.String remoteFile, boolean bypassCache)Get the size of the named file from the remote server.protected voidstart()protected voidstopSpeedTesting()Stops the current speed testing methods that this TransferMechanism may be executingprotected java.util.stream.Stream<FileListDataItem>streamWithInlineParse(java.lang.String directory)Returns streaming meta data for files in the current remote directory.protected java.util.stream.Stream<FileListDataItem>streamWithInlineParse(java.lang.String directory, java.util.function.BooleanSupplier isCancelled)protected booleansynchClient(FileTransferMechanism client)protected inttestApproximateDownloadSpeed()Performs a quick test to determine the approximate download speed to the connected server.protected inttestApproximateUploadSpeed()Performs a quick test to determine the approximate upload speed to the connected server.protected inttestMaximumDownloadSpeed()Performs a series of tests to determine the maximum download speed from the connected server.protected inttestMaximumUploadSpeed()Performs a series of tests to determine the maximum upload speed to the connected server.protected voidtestUDPACKs()Tests if UDP ACK mode is possible an configures internal variables.protected inttestWriteSpeed()Perform a write to current directory with recommended values for determining storage rate.protected inttestWriteSpeed(java.nio.file.Path file, int size, int timeout)Perform a write to specified file with specified size and timeout for determining storage rate.protected <FileType> voidtransferJobStream(java.util.stream.Stream<TransferJob.FileTypeJob<FileType>> stream)protected voidupdateServerOverrides()protected TransferHookupload(java.lang.String localFile)Upload the specified file to the current remote working directory.protected TransferHookupload(java.nio.file.Path localFile)Upload the specified file to the current remote working directory.protected TransferHookupload(java.nio.file.Path localFile, java.lang.String remotePath)Upload the specified file to the specified remote directory.protected TransferHookupload(java.nio.file.Path localFile, java.lang.String remotePath, java.lang.String transferUniqueID)Upload the specified file to the specified remote directory and specifies a unique transaction id.protected TransferHookupload(java.util.List<java.nio.file.Path> files)Uploads all File objects in the Vector provided to the current remote working directory.protected TransferHookupload(java.util.List<java.nio.file.Path> files, java.lang.String remotePath)Uploads all File objects in the Vector provided to the specified remote directory.protected TransferHookupload(java.util.List<java.nio.file.Path> files, java.lang.String remotePath, java.lang.String transferUniqueID)Uploads all File objects in the Vector provided to the specified remote directory.protected TransferHookuploadAs(java.nio.file.Path localFile, java.lang.String remoteFilename)Upload the specified file to the specified remote filename.protected TransferHookuploadAs(java.nio.file.Path localFile, java.lang.String remoteFilename, java.lang.String transferUniqueID)Upload the specified file to the specified remote filename.protected TransferHookuploadList(java.util.List files, java.lang.String remotePath, java.lang.String transferUniqueID, boolean needsRecurse)Uploads a list of files to the connected Server.protected voiduploadRange(java.nio.file.Path localFile, java.lang.String remoteFile, long offset, long length)Uploads a range of rate for the given fileprotected voiduploadStream(java.util.stream.Stream<java.nio.file.Path> stream)protected booleanwillTransferWork()Returns whether or not transfers will work under the current settings-
Methods inherited from class unlimited.fc.client.api.multiclient.MultiClientState
cleanupClientIfNeeded, completeClientFailure, connected, deleteAll, equals, getInitialState, getNextSessionID, getOldState, getParent, getReport, getTargetRateSlice, handleFailedTransfer, handleSuccessfulTransfer, informTransferFinished, informTransferStart, invalidState, isBadState, isCancelling, isIdle, isIncrementalSizeCheckOnly, isInitialized, isLoggedIn, isTransferComplete, notImplemented, resetBadState, sendEmail, setPostProcessorOverrides, synchClients, synchSpecificTypes, toString, transferComplete, transferStarted
-
-
-
-
Constructor Detail
-
CreatedState
protected CreatedState(MultiClientState oldState)
-
-
Method Detail
-
start
protected void start() throws unlimited.core.util.common.exception.FCException, java.io.IOException- Overrides:
startin classMultiClientState- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
pushJob
protected MultiClientTransferHook pushJob(TransferJob job) throws unlimited.core.util.common.exception.FCException, java.io.IOException
- Overrides:
pushJobin classMultiClientState- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
preProcess
protected void preProcess(TransferJob job) throws unlimited.core.util.common.exception.FCException, java.io.IOException
Description copied from class:MultiClientStatePreprocess the job with all of the preprocess that are currently set- Overrides:
preProcessin classMultiClientState- Parameters:
job- Job to preprocess- Throws:
unlimited.core.util.common.exception.FCException- if a FileCatalyst protocol error occurs.java.io.IOException- if an error occurs either connecting to the destination server, or if a transfer I/O error occurs.
-
pushJobNoProcessing
protected MultiClientTransferHook pushJobNoProcessing(TransferJob job) throws unlimited.core.util.common.exception.FCException, java.io.IOException
Description copied from class:MultiClientStatePushes a TransferJob into the Multi-Client for transfer. For this method, the job will not be processed before it is attempted- Overrides:
pushJobNoProcessingin classMultiClientState- Parameters:
job- Job to attempt- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
jobPushed
protected void jobPushed(TransferJob job)
Description copied from class:MultiClientStatePushes a TransferJob into the Multi-Client for transfer. It will be attempted when it is pulled from the Multi-Client's TransferJobQueue- Overrides:
jobPushedin classMultiClientState- Parameters:
job- Job to attempt
-
setPostTaskSentData
protected void setPostTaskSentData(PostTaskSentData data)
- Overrides:
setPostTaskSentDatain classMultiClientState
-
getHandledBy
public void getHandledBy(StateHandler handler)
Description copied from class:MultiClientStateGets the handled by.- Overrides:
getHandledByin classMultiClientState- Parameters:
handler- the handler
-
cd
protected void cd(java.lang.String path) throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateNavigates the manager into the supplied path.- Overrides:
cdin classMultiClientState- 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
-
remoteSynchFile
protected void remoteSynchFile(FileListDataItem aFile) throws unlimited.core.util.common.exception.FCException
Description copied from class:MultiClientStateThis is useful for progressive downloads when the updated value of the FileListData is required.- Overrides:
remoteSynchFilein classMultiClientState- Parameters:
aFile- a FileListDataItem with a valid name that the size and modified time will be updated.- Throws:
unlimited.core.util.common.exception.FCException
-
remoteSynchFile
protected java.util.stream.Stream<FileListDataItem> remoteSynchFile(java.util.stream.Stream<FileListDataItem> fileStream) throws unlimited.core.util.common.exception.FCException
- Overrides:
remoteSynchFilein classMultiClientState- Throws:
unlimited.core.util.common.exception.FCException
-
cdup
protected void cdup() throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateMove up one directory on the remote directory structure.- Overrides:
cdupin classMultiClientState- 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
-
doJob
protected void doJob(TransferRunner runner) throws unlimited.core.util.common.exception.FCException, java.io.IOException
- Overrides:
doJobin classMultiClientState- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
initialize
protected void initialize(boolean generateUserLogs)
Description copied from class:MultiClientStateInitialize Multi-Client object. This will initialize the logs for this session. The log location can be configured with the setLogLocation() method, but must be done before the initialize() method is called.- Overrides:
initializein classMultiClientState
-
initializeNoUserLogs
protected void initializeNoUserLogs()
Description copied from class:MultiClientStateInitializes the TransferMechanism with no user logs- Overrides:
initializeNoUserLogsin classMultiClientState
-
connect
protected void connect() throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateConnect to the FileCatalyst server. Reporting disabled.- Overrides:
connectin classMultiClientState- 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
-
isDowngradeModeOnReConnect
protected boolean isDowngradeModeOnReConnect()
Description copied from class:MultiClientStateReturns whether or not the state is set to downgrade mode on reconnect- Overrides:
isDowngradeModeOnReConnectin classMultiClientState- Returns:
-
setDowngradeModeOnReConnect
protected void setDowngradeModeOnReConnect(boolean downgradeModeOnReConnect)
- Overrides:
setDowngradeModeOnReConnectin classMultiClientState
-
setClientSubIdentifier
protected void setClientSubIdentifier(int clientSubIdentifier)
- Overrides:
setClientSubIdentifierin classMultiClientState
-
setClientString
protected void setClientString(java.lang.String clientString)
- Overrides:
setClientStringin classMultiClientState
-
getObserver
protected java.util.Observer getObserver()
- Overrides:
getObserverin classMultiClientState
-
setObserver
protected void setObserver(java.util.Observer observer)
- Overrides:
setObserverin classMultiClientState
-
getCallbackHandler
protected FileCatalystClientCallbackHandler getCallbackHandler()
Description copied from class:MultiClientStateReturns the current callback handler- Overrides:
getCallbackHandlerin classMultiClientState- Returns:
-
setCallbackHandler
protected void setCallbackHandler(FileCatalystClientCallbackHandler callbackHandler)
Description copied from class:MultiClientStateSets the current call back handler when called- Overrides:
setCallbackHandlerin classMultiClientState
-
synchClient
protected boolean synchClient(FileTransferMechanism client) throws unlimited.core.util.common.exception.FCException, java.io.IOException
- Overrides:
synchClientin classMultiClientState- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
getWriteFileMode
protected java.lang.String getWriteFileMode()
Description copied from class:MultiClientStateGets the write file mode when called- Overrides:
getWriteFileModein classMultiClientState- Returns:
-
setWriteFileMode
protected void setWriteFileMode(java.lang.String mode)
Description copied from class:MultiClientStateSet the write file mode- Overrides:
setWriteFileModein classMultiClientState
-
getWriteBufferSizeKB
protected int getWriteBufferSizeKB()
Description copied from class:MultiClientStateReturns the write buffer size- Overrides:
getWriteBufferSizeKBin classMultiClientState- Returns:
-
setWriteBufferSizeKB
protected void setWriteBufferSizeKB(int bufferSizeKB)
Description copied from class:MultiClientStateSet the write buffer size- Overrides:
setWriteBufferSizeKBin classMultiClientState
-
getReadBufferSizeKB
protected int getReadBufferSizeKB()
Description copied from class:MultiClientStateReturns the read buffer size in KB- Overrides:
getReadBufferSizeKBin classMultiClientState- Returns:
-
setReadBufferSizeKB
protected void setReadBufferSizeKB(int bufferSizeKB)
Description copied from class:MultiClientStateSets the read buffer size to the value supplied- Overrides:
setReadBufferSizeKBin classMultiClientState
-
getNumBlockReaders
protected int getNumBlockReaders()
Description copied from class:MultiClientStateReturns the number of block readers- Overrides:
getNumBlockReadersin classMultiClientState- Returns:
-
setNumBlockReaders
protected void setNumBlockReaders(int numBlockReaders)
- Overrides:
setNumBlockReadersin classMultiClientState
-
getNumBlockWriters
protected int getNumBlockWriters()
- Overrides:
getNumBlockWritersin classMultiClientState
-
setNumBlockWriters
protected void setNumBlockWriters(int numBlockWriters)
- Overrides:
setNumBlockWritersin classMultiClientState
-
getNumSenderThreads
protected int getNumSenderThreads()
- Overrides:
getNumSenderThreadsin classMultiClientState
-
setNumSenderThreads
protected void setNumSenderThreads(int numThreads)
- Overrides:
setNumSenderThreadsin classMultiClientState
-
getNumReceiveSockets
protected int getNumReceiveSockets()
- Overrides:
getNumReceiveSocketsin classMultiClientState
-
setNumReceiveSockets
protected void setNumReceiveSockets(int numReceiveSockets)
- Overrides:
setNumReceiveSocketsin classMultiClientState
-
getNumSenderSockets
protected int getNumSenderSockets()
- Overrides:
getNumSenderSocketsin classMultiClientState
-
setNumSenderSockets
protected void setNumSenderSockets(int numSenderSockets)
- Overrides:
setNumSenderSocketsin classMultiClientState
-
getPacketQueueDepth
protected int getPacketQueueDepth()
- Overrides:
getPacketQueueDepthin classMultiClientState
-
setPacketQueueDepth
protected void setPacketQueueDepth(int packetQueueDepth)
- Overrides:
setPacketQueueDepthin classMultiClientState
-
getNumPacketProcessors
protected int getNumPacketProcessors()
- Overrides:
getNumPacketProcessorsin classMultiClientState
-
setNumPacketProcessors
protected void setNumPacketProcessors(int numPacketProcessors)
- Overrides:
setNumPacketProcessorsin classMultiClientState
-
isCongestionControlEnabled
protected boolean isCongestionControlEnabled()
- Overrides:
isCongestionControlEnabledin classMultiClientState
-
getCongestionControlAggression
protected int getCongestionControlAggression()
- Overrides:
getCongestionControlAggressionin classMultiClientState
-
setCongestionControlEnabled
protected void setCongestionControlEnabled(boolean enabled)
- Overrides:
setCongestionControlEnabledin classMultiClientState
-
getCongCtrlStrategy
protected int getCongCtrlStrategy()
- Overrides:
getCongCtrlStrategyin classMultiClientState
-
setCongCtrlStrategy
protected void setCongCtrlStrategy(int congCtrlStrategy)
- Overrides:
setCongCtrlStrategyin classMultiClientState
-
willTransferWork
protected boolean willTransferWork()
Description copied from class:MultiClientStateReturns whether or not transfers will work under the current settings- Overrides:
willTransferWorkin classMultiClientState- Returns:
-
getConnectivityTestResults
protected ConnectivityTestResultContainer getConnectivityTestResults()
Description copied from class:MultiClientStateReturns a data container object that contains information about whether or not uploads, downloads or overall transfers will work- Overrides:
getConnectivityTestResultsin classMultiClientState- Returns:
-
resetAutoDetectInfo
protected void resetAutoDetectInfo()
Description copied from class:MultiClientStateResets all Auto-detect information- Overrides:
resetAutoDetectInfoin classMultiClientState
-
autoDetectConectionMode
protected void autoDetectConectionMode() throws unlimited.core.util.common.exception.FCException, java.io.IOException- Overrides:
autoDetectConectionModein classMultiClientState- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
autoDetectConectionModeDownload
protected void autoDetectConectionModeDownload() throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateThis method will attempt to detect the optimal connection method based on the provided server information, HTTP servlet location, and ports. It will also detect which mode to use for downloading files.- Overrides:
autoDetectConectionModeDownloadin classMultiClientState- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
autoDetectConectionModeUpload
protected void autoDetectConectionModeUpload() throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateThis method will attempt to detect the optimal connection method based on the provided server information, HTTP servlet location, and ports. It will also detect which mode to use for uploading files.- Overrides:
autoDetectConectionModeUploadin classMultiClientState- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
autoDetectConectionModeUploadAndDownload
protected void autoDetectConectionModeUploadAndDownload() throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateThis method will attempt to detect the optimal connection method based on the provided server information, HTTP servlet location, and ports. It will also detect which mode to use for uploading AND downloading files. If UDP fails for EITHER upload OR download, the mode will be reverted to FTP or HTTP- Overrides:
autoDetectConectionModeUploadAndDownloadin classMultiClientState- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
autoDetectConectionModeDownload
protected void autoDetectConectionModeDownload(boolean testUDP, boolean portFallback) throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateThis method will attempt to detect the optimal connection method based on the provided server information, HTTP servlet location, and ports. It will also detect which mode to use for downloading files.- Overrides:
autoDetectConectionModeDownloadin classMultiClientState- Parameters:
testUDP- true/false whether or not UDP test should be performedportFallback- true/false whether TCP data connection test should fallback to PORT if PASV fails.- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
autoDetectConectionModeUpload
protected void autoDetectConectionModeUpload(boolean testUDP, boolean portFallback) throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateThis method will attempt to detect the optimal connection method based on the provided server information, HTTP servlet location, and ports. It will also detect which mode to use for uploading files.- Overrides:
autoDetectConectionModeUploadin classMultiClientState- Parameters:
testUDP- true/false whether or not UDP test should be performedportFallback- true/false whether TCP data connection test should fallback to PORT if PASV fails.- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
autoDetectConectionModeUploadAndDownload
protected void autoDetectConectionModeUploadAndDownload(boolean portFallback) throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateThis method will attempt to detect the optimal connection method based on the provided server information, HTTP servlet location, and ports. It will also detect which mode to use for uploading AND downloading files. If UDP fails for EITHER upload OR download, the mode will be reverted to FTP or HTTP- Overrides:
autoDetectConectionModeUploadAndDownloadin classMultiClientState- Parameters:
portFallback- true/false whether TCP data connection test should fallback to PORT if PASV fails.- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
login
protected void login(java.util.function.Supplier<ClientCredentials> creds) throws unlimited.core.util.common.exception.FCException, java.io.IOException
Description copied from class:MultiClientStateLogin to the server with the specifed credentials.- Overrides:
loginin classMultiClientState- Parameters:
creds- The Credentials with which to authenticate- Throws:
unlimited.core.util.common.exception.FCException- If authentication failsjava.io.IOException- If a timeout, or other I/O error occurs
-
disconnect
protected void disconnect() throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateDisconnect from the server.- Overrides:
disconnectin classMultiClientState- 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
-
finish
protected void finish()
Description copied from class:MultiClientStateCleans up memory allocated by the native libraries component of FileCatalyst. This should be called when all transfers are completed and the FCClient object is no longer needed.- Overrides:
finishin classMultiClientState
-
exists
protected boolean exists(java.lang.String remoteFile) throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateTest if the remote file, denoted by the given remote path, exists on the server and returns true if it exists, false otherwise.- Overrides:
existsin classMultiClientState- 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
-
exists
protected 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> remoteFile) throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateTest if the remote file, denoted by the given remote path, exists on the server and returns true if it exists, false otherwise.- Overrides:
existsin classMultiClientState- 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
-
size
protected long size(java.lang.String remoteFile, boolean bypassCache) throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateGet the size of the named file from the remote server.- Overrides:
sizein classMultiClientState- Returns:
- the size of the file
- Throws:
unlimited.core.util.common.exception.FCException- if a FileCatalyst protocol error occurs.java.io.IOException- if an error occurs either connecting to the destination server, or if a transfer I/O error occurs.
-
download
protected TransferHook download(java.lang.String remoteFile) throws java.io.IOException, unlimited.core.util.common.exception.FCException
Description copied from class:MultiClientStateDownload a the specified file to the current local working directory.- Overrides:
downloadin classMultiClientState- Parameters:
remoteFile- The remote file to be downloaded. Can be a relative or absolute path to the file.- Returns:
- A handler object that can be monitored for progress and status information.
- 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
-
download
protected TransferHook download(java.lang.String remoteFile, java.lang.String localPath) throws unlimited.core.util.common.exception.FCException, java.io.IOException
Description copied from class:MultiClientStateDownload the specified file to the specified local path.- Overrides:
downloadin classMultiClientState- Parameters:
remoteFile- The remote file to be downloaded. Can be a relative or absolute path to the file.localPath- The local path to which the file will be stored- Returns:
- A handler object that can be monitored for progress and status information.
- 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
-
download
protected TransferHook download(java.util.List<java.lang.String> files) throws java.io.IOException, unlimited.core.util.common.exception.FCException
Description copied from class:MultiClientStateDownloads the files as specified by the paths (in String format) contained in the specified vector to the current working directory.- Overrides:
downloadin classMultiClientState- Parameters:
files- A Vector containing paths (as String) of files to be downloaded- Returns:
- A handler object that can be monitored for progress and status information.
- 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
-
download
protected TransferHook download(FileListData files) throws java.io.IOException, unlimited.core.util.common.exception.FCException
Description copied from class:MultiClientStateDownloads the files specified in the FileListData object to the current local working directory.- Overrides:
downloadin classMultiClientState- Parameters:
files- List of files to be downloaded- Returns:
- A handler object that can be monitored for progress and status information.
- Throws:
java.io.IOException- If a timeout, or other IO error occursunlimited.core.util.common.exception.FCException- If an error in the FC protocol occurs
-
download
protected TransferHook download(FileListData files, java.lang.String localPath, java.lang.String transferUniqueID, boolean needsRecurse) throws java.io.IOException, unlimited.core.util.common.exception.FCException
Description copied from class:MultiClientStateDownloads the files specified in the FileListData object to the specified path.- Overrides:
downloadin classMultiClientState- Parameters:
files- FileListDatalocalPath- StringtransferUniqueID- Assigns a unique transaction ID for the duration of this transfer. Overrides global setUniqueID() variable.needsRecurse- flag to recurse in any directories passed into the client object for transfer- Returns:
- A handler object that can be monitored for progress and status information.
- Throws:
java.io.IOException- If a timeout, or other IO error occursunlimited.core.util.common.exception.FCException- If an error in the FC protocol occurs
-
download
protected TransferHook download(java.util.List<java.lang.String> files, java.lang.String localPath) throws java.io.IOException, unlimited.core.util.common.exception.FCException
Description copied from class:MultiClientStateDownload the specified file to the specified local file.- Overrides:
downloadin classMultiClientState- Returns:
- A handler object that can be monitored for progress and status information.
- 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
-
download
protected TransferHook download(java.util.List<java.lang.String> files, java.lang.String localPath, java.lang.String transferUniqueID, boolean needsRecurse) throws java.io.IOException, unlimited.core.util.common.exception.FCException
Description copied from class:MultiClientStateDownloads the files as specified by the paths (in String format) contained in the specified vector to the current working directory.- Overrides:
downloadin classMultiClientState- Parameters:
files- A Vector containing paths (as String) of files to be downloadedlocalPath- The local path to which the files will be storedtransferUniqueID- Assigns a unique transaction ID for the duration of this transfer. Overrides global setUniqueID() variable.needsRecurse- flag to recurse in any directories passed into the client object for transfer- Returns:
- A handler object that can be monitored for progress and status information.
- 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
-
uploadStream
protected void uploadStream(java.util.stream.Stream<java.nio.file.Path> stream) throws unlimited.core.util.common.exception.FCException, java.io.IOException- Overrides:
uploadStreamin classMultiClientState- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
downloadStream
protected void downloadStream(java.util.stream.Stream<FileListDataItem> stream) throws unlimited.core.util.common.exception.FCException, java.io.IOException
- Overrides:
downloadStreamin classMultiClientState- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
transferJobStream
protected <FileType> void transferJobStream(java.util.stream.Stream<TransferJob.FileTypeJob<FileType>> stream) throws unlimited.core.util.common.exception.FCException, java.io.IOException
- Overrides:
transferJobStreamin classMultiClientState- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
uploadList
protected TransferHook uploadList(java.util.List files, java.lang.String remotePath, java.lang.String transferUniqueID, boolean needsRecurse) throws java.io.IOException, unlimited.core.util.common.exception.FCException
Description copied from class:MultiClientStateUploads a list of files to the connected Server.- Overrides:
uploadListin classMultiClientState- Parameters:
files- List of Paths to be uploadedremotePath- Remote path of where the files should land on the ServertransferUniqueID- Unique ID that you wish to have for the transferneedsRecurse- Whether or not the code should recurse into the file to transfer it (defaults to true)- Returns:
- Throws:
unlimited.core.util.common.exception.FCException- if a FileCatalyst protocol error occurs.java.io.IOException- if an error occurs either connecting to the destination server, or if a transfer I/O error occurs.
-
upload
protected TransferHook upload(java.lang.String localFile) throws java.io.IOException, unlimited.core.util.common.exception.FCException
Description copied from class:MultiClientStateUpload the specified file to the current remote working directory.- Overrides:
uploadin classMultiClientState- Parameters:
localFile- The local file to be uploaded, can be a directory as well- Returns:
- A handler object that can be monitored for progress and status information.
- 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
-
upload
protected TransferHook upload(java.nio.file.Path localFile) throws java.io.IOException, unlimited.core.util.common.exception.FCException
Description copied from class:MultiClientStateUpload the specified file to the current remote working directory.- Overrides:
uploadin classMultiClientState- Parameters:
localFile- The local file to be uploaded, can be a directory as well- Returns:
- A handler object that can be monitored for progress and status information.
- 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
-
upload
protected TransferHook upload(java.nio.file.Path localFile, java.lang.String remotePath) throws unlimited.core.util.common.exception.FCException, java.io.IOException
Description copied from class:MultiClientStateUpload the specified file to the specified remote directory.- Overrides:
uploadin classMultiClientState- Parameters:
localFile- The local file to be uploaded, can be a directory as wellremotePath- The remote path where files should be uploaded- Returns:
- A handler object that can be monitored for progress and status information.
- 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
-
upload
protected TransferHook upload(java.nio.file.Path localFile, java.lang.String remotePath, java.lang.String transferUniqueID) throws unlimited.core.util.common.exception.FCException, java.io.IOException
Description copied from class:MultiClientStateUpload the specified file to the specified remote directory and specifies a unique transaction id.- Overrides:
uploadin classMultiClientState- Parameters:
localFile- The local file to be uploaded, can be a directory as wellremotePath- The remote path where files should be uploadedtransferUniqueID- Assigns a unique transaction ID for the duration of this transfer. Overrides global setUniqueID() variable.- Returns:
- A handler object that can be monitored for progress and status information.
- 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
-
uploadAs
protected TransferHook uploadAs(java.nio.file.Path localFile, java.lang.String remoteFilename) throws unlimited.core.util.common.exception.FCException, java.io.IOException
Description copied from class:MultiClientStateUpload the specified file to the specified remote filename. The remoteFilename filename parameter can be a plain filename, in which case it will be uploaded to the current remote directory. It can also be a relative or absolute path on the remote server. i.e. /path/to/stor/file.zip- Overrides:
uploadAsin classMultiClientState- Parameters:
localFile- The local file to be uploaded, can be a directory as wellremoteFilename- The filename to which this file will be stored- Returns:
- A handler object that can be monitored for progress and status information.
- 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
-
uploadAs
protected TransferHook uploadAs(java.nio.file.Path localFile, java.lang.String remoteFilename, java.lang.String transferUniqueID) throws unlimited.core.util.common.exception.FCException, java.io.IOException
Description copied from class:MultiClientStateUpload the specified file to the specified remote filename. The remoteFilename filename parameter can be a plain filename, in which case it will be uploaded to the current remote directory. It can also be a relative or absolute path on the remote server. i.e. /path/to/stor/file.zip- Overrides:
uploadAsin classMultiClientState- Parameters:
localFile- The local file to be uploaded, can be a directory as wellremoteFilename- The filename to which this file will be storedtransferUniqueID- Assigns a unique transaction ID for the duration of this transfer. Overrides global setUniqueID() variable.- Returns:
- A handler object that can be monitored for progress and status information.
- 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
-
upload
protected TransferHook upload(java.util.List<java.nio.file.Path> files) throws java.io.IOException, unlimited.core.util.common.exception.FCException
Description copied from class:MultiClientStateUploads all File objects in the Vector provided to the current remote working directory.- Overrides:
uploadin classMultiClientState- Parameters:
files- A Vector of File objects to be uploaded- Returns:
- A handler object that can be monitored for progress and status information.
- 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
-
upload
protected TransferHook upload(java.util.List<java.nio.file.Path> files, java.lang.String remotePath) throws java.io.IOException, unlimited.core.util.common.exception.FCException
Description copied from class:MultiClientStateUploads all File objects in the Vector provided to the specified remote directory.- Overrides:
uploadin classMultiClientState- Parameters:
files- A Vector of File objects to be uploadedremotePath- The remote path where files should be uploaded- Returns:
- A handler object that can be monitored for progress and status information.
- 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
-
upload
protected TransferHook upload(java.util.List<java.nio.file.Path> files, java.lang.String remotePath, java.lang.String transferUniqueID) throws java.io.IOException, unlimited.core.util.common.exception.FCException
Description copied from class:MultiClientStateUploads all File objects in the Vector provided to the specified remote directory.- Overrides:
uploadin classMultiClientState- Parameters:
files- A Vector of File objects to be uploadedremotePath- The remote path where files should be uploadedtransferUniqueID- Assigns a unique transaction ID for the duration of this transfer. Overrides global setUniqueID() variable.- Returns:
- A handler object that can be monitored for progress and status information.
- 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
-
addCustomLogHandler
protected void addCustomLogHandler(java.util.logging.Handler handler)
Description copied from class:MultiClientStateAdds a custom log handler to which API logs will be published. This should be called prior to calling initialize() to have an affect.- Overrides:
addCustomLogHandlerin classMultiClientState- Parameters:
handler- The log handler to add.
-
quote
protected java.lang.String quote(java.lang.String command) throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionDescription copied from class:MultiClientStateIssue arbitrary FileCatalyst commands to the FileCatalyst server. example: MD5 commands can be called from here- Overrides:
quotein classMultiClientState- Parameters:
command- command to be sent to server- Returns:
- sends back the server response to the command.
- 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
-
noop
protected void noop() throws java.io.IOException, unlimited.core.util.common.exception.FCException- Overrides:
noopin classMultiClientState- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
pwd
protected java.lang.String pwd() throws unlimited.core.util.common.exception.FCException, java.io.IOException- Overrides:
pwdin classMultiClientState- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
fsEvents
protected void fsEvents() throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStatePrints out a list of the current file system events that are set on the server. Uses a default timeout value of 1000.- Overrides:
fsEventsin classMultiClientState- 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
-
delete
protected void delete(java.lang.String file) throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateDeletes the specified file from the remote file system.- Overrides:
deletein classMultiClientState- Parameters:
file- The file to be deleted- 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
-
deleteAll
protected void deleteAll(java.util.List files) throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateDelete all specified files in a single efficient command. Files and directories may be passed, and are deleted recursively.- Overrides:
deleteAllin classMultiClientState- Parameters:
files- List of files to delete- 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
-
deleteAll
protected void deleteAll(FileListData files) throws java.io.IOException, unlimited.core.util.common.exception.FCException
Description copied from class:MultiClientStateDelete all specified files in a single efficient command. Files and directories may be passed, and are deleted recursively.- Overrides:
deleteAllin classMultiClientState- Parameters:
files- List of files to delete- 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
-
deleteAll
protected void deleteAll(FileListDataItem[] files) throws java.io.IOException, unlimited.core.util.common.exception.FCException
Description copied from class:MultiClientStateDelete all specified files in a single efficient command. Files and directories may be passed, and are deleted recursively.- Overrides:
deleteAllin classMultiClientState- Parameters:
files- List of files to delete- 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
-
flushCaches
protected void flushCaches()
Description copied from class:MultiClientStateDeletes underlying caches for file sizes and date/time stamps- Overrides:
flushCachesin classMultiClientState
-
mkdir
protected void mkdir(java.lang.String dir) throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateCreates the specified directory on the remote file system.- Overrides:
mkdirin classMultiClientState- Parameters:
dir- The directory to be created- Throws:
unlimited.core.util.common.exception.FCException- If an error in the FC protocol occurs, i.e. permissions deniedjava.io.IOException- If a timeout, or other IO error occurs
-
rmdir
protected void rmdir(java.lang.String dir) throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateDeletes the specified directory from the remote file system.- Overrides:
rmdirin classMultiClientState- Parameters:
dir- The directory to be deleted- 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
-
rmdirRecursive
protected void rmdirRecursive(FileListDataItem fileListDataItem) throws java.lang.Exception
Description copied from class:MultiClientStateDeletes a directory on the server in a recursive manner.- Overrides:
rmdirRecursivein classMultiClientState- Parameters:
fileListDataItem- Directory that should be deleted- Throws:
java.lang.Exception- IOException or FCException depending on the issue encountered
-
rename
protected void rename(java.lang.String oldName, java.lang.String newName) throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateRenames the specified file to the new name.- Overrides:
renamein classMultiClientState- Parameters:
oldName- File to be renamednewName- New name for the file- 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
-
list
protected FileListData list() throws unlimited.core.util.common.exception.FCException, java.io.IOException
Description copied from class:MultiClientStateReturns meta data for files in the current remote directory.- Overrides:
listin classMultiClientState- Returns:
- meta data for files in the current remote directory.
- 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
-
list
protected FileListData list(java.lang.String wildcard, java.lang.String remoteDirectory) throws unlimited.core.util.common.exception.FCException, java.io.IOException
Description copied from class:MultiClientStateReturns meta data for files in the remote directory.- Overrides:
listin classMultiClientState- Parameters:
wildcard- only return items that match this pattern- Returns:
- meta data for files in the current remote directory.
- 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
-
listWithInlineParse
protected FileListData listWithInlineParse() throws unlimited.core.util.common.exception.FCException, java.io.IOException
Description copied from class:MultiClientStateReturns meta data for files in the current remote directory.- Overrides:
listWithInlineParsein classMultiClientState- Returns:
- meta data for files in the current remote directory.
- 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
-
listWithInlineParse
protected FileListData listWithInlineParse(java.lang.String directory) throws unlimited.core.util.common.exception.FCException, java.io.IOException
Description copied from class:MultiClientStateReturns meta data for files in the given remote directory.- Overrides:
listWithInlineParsein classMultiClientState- Parameters:
directory- to get data from- Returns:
- meta data for files in the given remote directory.
- 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
-
streamWithInlineParse
protected java.util.stream.Stream<FileListDataItem> streamWithInlineParse(java.lang.String directory) throws unlimited.core.util.common.exception.FCException, java.io.IOException
Description copied from class:MultiClientStateReturns streaming meta data for files in the current remote directory.- Overrides:
streamWithInlineParsein classMultiClientState- Returns:
- stream of FileListDataItems
- 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
-
streamWithInlineParse
protected java.util.stream.Stream<FileListDataItem> streamWithInlineParse(java.lang.String directory, java.util.function.BooleanSupplier isCancelled) throws unlimited.core.util.common.exception.FCException, java.io.IOException
- Overrides:
streamWithInlineParsein classMultiClientState- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
listNoParse
public FileListData listNoParse(java.lang.String directory) throws unlimited.core.util.common.exception.FCException, java.io.IOException
- Overrides:
listNoParsein classMultiClientState- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
list
protected FileListData list(java.lang.String wildcard) throws unlimited.core.util.common.exception.FCException, java.io.IOException
Description copied from class:MultiClientStateReturns meta data for files in the current remote directory.- Overrides:
listin classMultiClientState- Parameters:
wildcard- only return items that match this pattern- Returns:
- meta data for files in the current remote directory.
- 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
-
listRecursiveFTPCompatible
protected FileListData listRecursiveFTPCompatible(java.lang.String directory) throws unlimited.core.util.common.exception.FCException, java.io.IOException
Description copied from class:MultiClientStateThis is a ftp compatible listWithInlineParse();- Overrides:
listRecursiveFTPCompatiblein classMultiClientState- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
getRemoteServer
protected java.lang.String getRemoteServer()
- Overrides:
getRemoteServerin classMultiClientState
-
setRemoteServer
protected void setRemoteServer(java.lang.String remoteServer)
- Overrides:
setRemoteServerin classMultiClientState
-
getRemotePort
protected int getRemotePort()
- Overrides:
getRemotePortin classMultiClientState
-
setRemotePort
protected void setRemotePort(int remotePort)
- Overrides:
setRemotePortin classMultiClientState
-
getMode
protected int getMode()
- Overrides:
getModein classMultiClientState
-
setMode
protected void setMode(int mode)
- Overrides:
setModein classMultiClientState
-
setTargetRate
protected void setTargetRate(int targetRate, BandwidthDistributionMode skipOverrides)- Overrides:
setTargetRatein classMultiClientState
-
setTransferToServerOverride
protected void setTransferToServerOverride(int serverOverrideBW)
- Overrides:
setTransferToServerOverridein classMultiClientState
-
updateServerOverrides
protected void updateServerOverrides()
- Overrides:
updateServerOverridesin classMultiClientState
-
getBlockSize
protected int getBlockSize()
- Overrides:
getBlockSizein classMultiClientState
-
setBlockSize
protected void setBlockSize(int blockSize)
- Overrides:
setBlockSizein classMultiClientState
-
getPacketSize
protected int getPacketSize()
- Overrides:
getPacketSizein classMultiClientState
-
setPacketSize
protected void setPacketSize(int packetSize)
- Overrides:
setPacketSizein classMultiClientState
-
setTransactionID
protected void setTransactionID(java.lang.String uniqueID)
- Overrides:
setTransactionIDin classMultiClientState
-
isAutoResume
protected boolean isAutoResume()
- Overrides:
isAutoResumein classMultiClientState
-
setAutoResume
protected void setAutoResume(boolean autoResume)
- Overrides:
setAutoResumein classMultiClientState
-
isVerifyIntegrity
protected boolean isVerifyIntegrity()
- Overrides:
isVerifyIntegrityin classMultiClientState
-
setVerifyIntegrity
protected void setVerifyIntegrity(boolean verifyIntegrity)
- Overrides:
setVerifyIntegrityin classMultiClientState
-
isMaintainPermissions
protected boolean isMaintainPermissions()
- Overrides:
isMaintainPermissionsin classMultiClientState
-
setMaintainPermissions
protected void setMaintainPermissions(boolean maintainPermissions)
- Overrides:
setMaintainPermissionsin classMultiClientState
-
isMaintainLastModified
protected boolean isMaintainLastModified()
- Overrides:
isMaintainLastModifiedin classMultiClientState
-
setMaintainLastModified
protected void setMaintainLastModified(boolean maintainLastModified)
- Overrides:
setMaintainLastModifiedin classMultiClientState
-
isOptimizeBlockSize
protected boolean isOptimizeBlockSize()
- Overrides:
isOptimizeBlockSizein classMultiClientState
-
setOptimizeBlockSize
protected void setOptimizeBlockSize(boolean optimizeBlockSize)
- Overrides:
setOptimizeBlockSizein classMultiClientState
-
getClientCredentials
protected java.util.function.Supplier<ClientCredentials> getClientCredentials()
- Overrides:
getClientCredentialsin classMultiClientState
-
setClientCredentials
protected void setClientCredentials(java.util.function.Supplier<ClientCredentials> creds)
- Overrides:
setClientCredentialsin classMultiClientState
-
isUseSSL
protected boolean isUseSSL()
- Overrides:
isUseSSLin classMultiClientState
-
setUseSSL
protected void setUseSSL(boolean useSSL)
- Overrides:
setUseSSLin classMultiClientState
-
setSSLSocketProducer
protected void setSSLSocketProducer(unlimited.core.util.common.net.ssl.FCSSLSocketProducerImpl socketProducer)
- Overrides:
setSSLSocketProducerin classMultiClientState
-
getLogLocation
protected java.lang.String getLogLocation()
- Overrides:
getLogLocationin classMultiClientState
-
setLogLocation
protected void setLogLocation(java.lang.String logLocation)
- Overrides:
setLogLocationin classMultiClientState
-
setLogPrefix
public void setLogPrefix(java.lang.String logPrefix)
Description copied from class:MultiClientStateSets the prefix of the log files to whatever value is supplied- Overrides:
setLogPrefixin classMultiClientState- Parameters:
logPrefix- New prefix to apply
-
getLogger
protected unlimited.core.util.common.logs.LogUtils getLogger()
- Overrides:
getLoggerin classMultiClientState
-
setLogger
protected void setLogger(unlimited.core.util.common.logs.LogUtils logger)
- Overrides:
setLoggerin classMultiClientState
-
setLoggerAttempt
protected java.lang.Throwable setLoggerAttempt(unlimited.core.util.common.logs.LogUtils logger)
-
getStartRate
protected int getStartRate()
- Overrides:
getStartRatein classMultiClientState
-
setStartRate
protected void setStartRate(int slowStartRate)
- Overrides:
setStartRatein classMultiClientState
-
getConnectTimeout
protected int getConnectTimeout()
- Overrides:
getConnectTimeoutin classMultiClientState
-
setConnectTimeout
protected void setConnectTimeout(int millisec)
- Overrides:
setConnectTimeoutin classMultiClientState
-
isShowConsoleLog
protected boolean isShowConsoleLog()
- Overrides:
isShowConsoleLogin classMultiClientState
-
setShowConsoleLog
protected void setShowConsoleLog(boolean showConsoleLog)
- Overrides:
setShowConsoleLogin classMultiClientState
-
isDebug
protected boolean isDebug()
- Overrides:
isDebugin classMultiClientState
-
setDebug
protected void setDebug(boolean debug)
- Overrides:
setDebugin classMultiClientState
-
getNumFTPStreams
protected int getNumFTPStreams()
- Overrides:
getNumFTPStreamsin classMultiClientState
-
getIncrementalMode
protected int getIncrementalMode()
- Overrides:
getIncrementalModein classMultiClientState
-
isTransferWithTempName
protected boolean isTransferWithTempName()
- Overrides:
isTransferWithTempNamein classMultiClientState
-
getReadTimeout
protected int getReadTimeout()
- Overrides:
getReadTimeoutin classMultiClientState
-
getExtendedReadTimeout
protected int getExtendedReadTimeout()
- Overrides:
getExtendedReadTimeoutin classMultiClientState
-
getVerifyMode
protected int getVerifyMode()
- Overrides:
getVerifyModein classMultiClientState
-
getServletLocation
protected java.lang.String getServletLocation()
- Overrides:
getServletLocationin classMultiClientState
-
getLocalWorkingDirectory
protected java.lang.String getLocalWorkingDirectory()
- Overrides:
getLocalWorkingDirectoryin classMultiClientState
-
isDeleteAfterTransfer
protected boolean isDeleteAfterTransfer()
- Overrides:
isDeleteAfterTransferin classMultiClientState
-
isProgressiveTransfers
protected boolean isProgressiveTransfers()
- Overrides:
isProgressiveTransfersin classMultiClientState
-
getProgressiveTimeout
protected int getProgressiveTimeout()
- Overrides:
getProgressiveTimeoutin classMultiClientState
-
getProgressiveTimeoutFilter
protected java.lang.String getProgressiveTimeoutFilter()
- Overrides:
getProgressiveTimeoutFilterin classMultiClientState
-
getIncomingDataPort
protected int getIncomingDataPort()
- Overrides:
getIncomingDataPortin classMultiClientState
-
getIncomingDataPorts
protected int[] getIncomingDataPorts()
- Overrides:
getIncomingDataPortsin classMultiClientState
-
getServletMultiplier
protected int getServletMultiplier()
- Overrides:
getServletMultiplierin classMultiClientState
-
getClientConnectKey
protected java.lang.String getClientConnectKey()
- Overrides:
getClientConnectKeyin classMultiClientState
-
setNumFTPStreams
protected void setNumFTPStreams(int numFTPStreams)
- Overrides:
setNumFTPStreamsin classMultiClientState
-
setIncrementalMode
protected void setIncrementalMode(int incrementalMode)
- Overrides:
setIncrementalModein classMultiClientState
-
setIncrementalSizeCheckOnly
public void setIncrementalSizeCheckOnly(boolean incrementalSizeCheckOnly)
- Overrides:
setIncrementalSizeCheckOnlyin classMultiClientState
-
setTransferWithTempName
protected void setTransferWithTempName(boolean transferWithTempName)
- Overrides:
setTransferWithTempNamein classMultiClientState
-
setReadTimeout
protected void setReadTimeout(int millisecs)
- Overrides:
setReadTimeoutin classMultiClientState
-
setExtendedReadTimeout
protected void setExtendedReadTimeout(int millisecs)
- Overrides:
setExtendedReadTimeoutin classMultiClientState
-
setFileTransferPriority
protected void setFileTransferPriority(int priority)
- Overrides:
setFileTransferPriorityin classMultiClientState
-
setVerifyMode
protected void setVerifyMode(int verifyMode)
- Overrides:
setVerifyModein classMultiClientState
-
setServletLocation
protected void setServletLocation(java.lang.String servletLocation)
- Overrides:
setServletLocationin classMultiClientState
-
setServletLocation
protected void setServletLocation(java.lang.String servletLocation, java.lang.String servletSessionID, java.lang.String welcomeMessage)- Overrides:
setServletLocationin classMultiClientState
-
setLocalWorkingDirectory
protected void setLocalWorkingDirectory(java.nio.file.Path localWorkingDirectory)
- Overrides:
setLocalWorkingDirectoryin classMultiClientState
-
setDeleteAfterTransfer
protected void setDeleteAfterTransfer(boolean deleteAfterTransfer)
- Overrides:
setDeleteAfterTransferin classMultiClientState
-
setProgressiveTransfers
protected void setProgressiveTransfers(boolean progressiveTransfers)
- Overrides:
setProgressiveTransfersin classMultiClientState
-
setProgressiveTimeout
protected void setProgressiveTimeout(int progressiveTimeout)
- Overrides:
setProgressiveTimeoutin classMultiClientState
-
setProgressiveTimeoutFilter
protected void setProgressiveTimeoutFilter(java.lang.String progressiveTimeoutFilter)
- Overrides:
setProgressiveTimeoutFilterin classMultiClientState
-
setIncomingDataPort
protected void setIncomingDataPort(int inDataPort)
- Overrides:
setIncomingDataPortin classMultiClientState
-
setIncomingDataPorts
protected void setIncomingDataPorts(int[] inDataPorts)
- Overrides:
setIncomingDataPortsin classMultiClientState
-
setServletMultiplier
protected void setServletMultiplier(int servletMultiplier)
- Overrides:
setServletMultiplierin classMultiClientState
-
setClientConnectKey
protected void setClientConnectKey(java.lang.String clientConnectKey)
- Overrides:
setClientConnectKeyin classMultiClientState
-
setClientIdentifier
protected void setClientIdentifier(int clientIdentifier)
- Overrides:
setClientIdentifierin classMultiClientState
-
setCongestionControlAggression
protected void setCongestionControlAggression(int congestionControlAggression)
- Overrides:
setCongestionControlAggressionin classMultiClientState
-
setTransferWithTempName
protected void setTransferWithTempName(boolean transferWithTempName, int tempMode)- Overrides:
setTransferWithTempNamein classMultiClientState
-
testWriteSpeed
protected int testWriteSpeed() throws java.io.FileNotFoundException, java.io.IOExceptionDescription copied from class:MultiClientStatePerform a write to current directory with recommended values for determining storage rate.- Overrides:
testWriteSpeedin classMultiClientState- Returns:
- write speed in kilobits per second
- Throws:
java.io.FileNotFoundExceptionjava.io.IOException
-
testWriteSpeed
protected int testWriteSpeed(java.nio.file.Path file, int size, int timeout) throws java.io.FileNotFoundException, java.io.IOExceptionDescription copied from class:MultiClientStatePerform a write to specified file with specified size and timeout for determining storage rate.- Overrides:
testWriteSpeedin classMultiClientState- Parameters:
file- file to writesize- size of file in bytestimeout- timeout of write in milliseconds- Returns:
- write speed in kilobits per second
- Throws:
java.io.FileNotFoundExceptionjava.io.IOException
-
testMaximumUploadSpeed
protected int testMaximumUploadSpeed() throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStatePerforms a series of tests to determine the maximum upload speed to the connected server.- Overrides:
testMaximumUploadSpeedin classMultiClientState- Returns:
- int the rate detected in Kbps
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
testMaximumDownloadSpeed
protected int testMaximumDownloadSpeed() throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStatePerforms a series of tests to determine the maximum download speed from the connected server.- Overrides:
testMaximumDownloadSpeedin classMultiClientState- Returns:
- int the rate detected in Kbps
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
stopSpeedTesting
protected void stopSpeedTesting()
Description copied from class:MultiClientStateStops the current speed testing methods that this TransferMechanism may be executing- Overrides:
stopSpeedTestingin classMultiClientState
-
filesMatch
protected boolean filesMatch(java.nio.file.Path file, java.lang.String rFile, int md5RateLimit, unlimited.core.util.common.CancelHandler cancelHandler) throws unlimited.core.util.common.exception.FCException, java.io.IOException, java.lang.ExceptionDescription copied from class:MultiClientStateVerifies whether a local file matches a remote file using MD5 checksum- Overrides:
filesMatchin classMultiClientState- Parameters:
file- Local filerFile- Remote filecancelHandler- Cancel Handler- Returns:
- true if the local file matches the remote file, false if they don't match
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOExceptionjava.lang.Exception
-
getMD5Checksum
protected java.lang.String getMD5Checksum(java.lang.String rFile) throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateReturns the MD5 checksum for the given remote file- Overrides:
getMD5Checksumin classMultiClientState- Returns:
- the MD5 checksum for the given remote file
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
getMD5
protected java.lang.String getMD5(java.lang.String remote) throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateReturns the MD5 checksum for the specified remote file if it exists- Overrides:
getMD5in classMultiClientState- Parameters:
remote- file to checksum- Returns:
- String representation of the remote file's MD5 checksum
- Throws:
unlimited.core.util.common.exception.FCException- if not connectedjava.io.IOException
-
serverVersion
protected java.lang.String serverVersion() throws unlimited.core.util.common.exception.FCExceptionDescription copied from class:MultiClientStateReturns the FileCatalyst server version.- Overrides:
serverVersionin classMultiClientState- Returns:
- FileCatalyst Server version
- Throws:
unlimited.core.util.common.exception.FCException- Exception thrown if not connected.
-
isFileCatalystServer
protected boolean isFileCatalystServer() throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionDescription copied from class:MultiClientStateReturns true if connected to a FileCatalyst server. Returns false if connected to a standard FTP server.- Overrides:
isFileCatalystServerin classMultiClientState- Returns:
- true if connected to a FileCatalyst server.
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
isUDPSupported
protected boolean isUDPSupported() throws java.io.IOException, unlimited.core.util.common.exception.FCExceptionDescription copied from class:MultiClientStateReturns true if connected to a FileCatalyst server that supports UDP.- Overrides:
isUDPSupportedin classMultiClientState- Returns:
- Returns false if you are not FileCatalyst or if UDP is not supported by license.
- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
getMaxRetries
protected int getMaxRetries()
- Overrides:
getMaxRetriesin classMultiClientState
-
setMaxRetries
protected void setMaxRetries(int maxRetries)
- Overrides:
setMaxRetriesin classMultiClientState
-
getWaitRetry
protected long getWaitRetry()
- Overrides:
getWaitRetryin classMultiClientState
-
isForceTCPmodeACKs
protected boolean isForceTCPmodeACKs()
- Overrides:
isForceTCPmodeACKsin classMultiClientState
-
setForceTCPmodeACKs
protected void setForceTCPmodeACKs(boolean forceTCPmodeACKs)
- Overrides:
setForceTCPmodeACKsin classMultiClientState
-
setWaitRetry
protected void setWaitRetry(long waitRetry)
- Overrides:
setWaitRetryin classMultiClientState
-
testUDPACKs
protected void testUDPACKs() throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateTests if UDP ACK mode is possible an configures internal variables. This method only needs to be called if the FCClient object was created using an existing authenticated Socket object.- Overrides:
testUDPACKsin classMultiClientState- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
isUseCongestionControl
protected boolean isUseCongestionControl()
- Overrides:
isUseCongestionControlin classMultiClientState
-
setUseCongestionControl
protected void setUseCongestionControl(boolean useCongestionControl)
- Overrides:
setUseCongestionControlin classMultiClientState
-
getUnitSize
protected int getUnitSize()
- Overrides:
getUnitSizein classMultiClientState
-
setUnitSize
protected void setUnitSize(int unitSize)
- Overrides:
setUnitSizein classMultiClientState
-
getNumUDPSockets
protected int getNumUDPSockets()
- Overrides:
getNumUDPSocketsin classMultiClientState
-
setNumUDPSockets
protected void setNumUDPSockets(int numUDPSockets)
- Overrides:
setNumUDPSocketsin classMultiClientState
-
getNumThreads
protected int getNumThreads()
- Overrides:
getNumThreadsin classMultiClientState
-
setNumThreads
protected void setNumThreads(int numThreads)
- Overrides:
setNumThreadsin classMultiClientState
-
setFileFilter
protected void setFileFilter(FileCatalystFileFilter filter)
- Overrides:
setFileFilterin classMultiClientState
-
setReport
public void setReport(unlimited.fc.reporting.ClientDataReport reporter)
Description copied from class:MultiClientStateSets the report object.- Overrides:
setReportin classMultiClientState
-
remoteUpload
protected TransferHook remoteUpload(FCClient destServer, java.lang.String sourceFile, java.lang.String destFile) throws unlimited.core.util.common.exception.FCException, java.io.IOException, java.lang.Exception
Description copied from class:MultiClientStateThis method will initiate an upload from the server to which this FCClient object (Server A) is connected to the server specified by the destServer parameter passed in (Server B). The sourceFile is the path to a file on Server A and the desFile is the path on Server B where the file will be uploaded. This method returns a TransferHook which may be monitored for status information, and which allows the transfer to be canceled. All transfer parameters, transfer mode, etc... are specified through the regular API methods, such as setBlocksize(), setMode(), etc...- Overrides:
remoteUploadin classMultiClientState- Parameters:
destServer- an FCClient object from which remote connection information will be taken. It doesn't have to be connected.sourceFile- the absolute or relative path to the source filedestFile- the absolute or relative path to the destination file- Returns:
- a TransferHook which may be monitored for status information
- Throws:
unlimited.core.util.common.exception.FCException- if a FileCatalyst protocol error occurs.java.io.IOException- if an error occurs either connecting to the destination server, or if a transfer I/O error occurs.java.lang.Exception
-
remoteUpload
protected TransferHook remoteUpload(FCClient destServer, java.util.List<java.lang.String> sourceFiles, java.util.List<java.lang.String> destFiles) throws unlimited.core.util.common.exception.FCException, java.io.IOException, java.lang.Exception
Description copied from class:MultiClientStateThis method will initiate an upload from the server to which this FCClient object (Server A) is connected to the server specified by the destServer parameter passed in (Server B). The sourceFile is the path to a file on Server A and the desFile is the path on Server B where the file will be uploaded. This method returns a TransferHook which may be monitored for status information, and which allows the transfer to be canceled. All transfer parameters, transfer mode, etc... are specified through the regular API methods, such as setBlocksize(), setMode(), etc...- Overrides:
remoteUploadin classMultiClientState- Parameters:
destServer- an FCClient object from which remote connection information will be taken. It doesn't have to be connected.sourceFiles- a list of absolute or relative paths to the source files to be transferreddestFiles- a list of absolute or relative paths to the destination files. Size must match sourceFiles List.- Returns:
- a TransferHook which may be monitored for status information
- Throws:
unlimited.core.util.common.exception.FCException- if a FileCatalyst protocol error occurs.java.io.IOException- if an error occurs either connecting to the destination server, or if a transfer I/O error occurs.java.lang.Exception
-
downloadAs
protected TransferHook downloadAs(FileListDataItem remoteFile, java.nio.file.Path localFile, java.lang.String transferUniqueID) throws unlimited.core.util.common.exception.FCException, java.io.IOException
Description copied from class:MultiClientStateDownload the specified file to the specified local file.- Overrides:
downloadAsin classMultiClientState- Parameters:
remoteFile- The remote file to be downloaded. Can be a relative or absolute path to the file.localFile- The local path to which the file will be stored. Can be a different path entirelytransferUniqueID- Unique ID for the transfer- Returns:
- A handler object that can be monitored for progress and status information.
- 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
-
testApproximateUploadSpeed
protected int testApproximateUploadSpeed() throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStatePerforms a quick test to determine the approximate upload speed to the connected server.- Overrides:
testApproximateUploadSpeedin classMultiClientState- Returns:
- int the rate detected in Kbps
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
getHumanReadableName
public java.lang.String getHumanReadableName()
Description copied from class:MultiClientStateReturns a human readable name for the state. Used within toString()- Overrides:
getHumanReadableNamein classMultiClientState- Returns:
- A human readable name
-
testApproximateDownloadSpeed
protected int testApproximateDownloadSpeed() throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStatePerforms a quick test to determine the approximate download speed to the connected server.- Overrides:
testApproximateDownloadSpeedin classMultiClientState- Returns:
- int the rate detected in Kbps
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
setCompFileFilter
protected void setCompFileFilter(java.lang.String compFileFilter)
- Overrides:
setCompFileFilterin classMultiClientState
-
setPostURL
protected void setPostURL(java.lang.String postURL)
- Overrides:
setPostURLin classMultiClientState
-
setMd5RateLimit
protected void setMd5RateLimit(int md5RateLimit)
- Overrides:
setMd5RateLimitin classMultiClientState
-
setRenameExtension
protected void setRenameExtension(boolean renameExtension)
- Overrides:
setRenameExtensionin classMultiClientState
-
fileSystemEvents
protected java.util.List<FileSystemEvent> fileSystemEvents(long timeout) throws unlimited.core.util.common.exception.FCException, java.io.IOException
Description copied from class:MultiClientStateReturns the file system events, (if any I assume).- Overrides:
fileSystemEventsin classMultiClientState- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
setTransferEmptyDirectories
protected void setTransferEmptyDirectories(boolean transferEmptyDirectories)
- Overrides:
setTransferEmptyDirectoriesin classMultiClientState
-
setCancelled
protected void setCancelled()
- Overrides:
setCancelledin classMultiClientState
-
prms
protected java.lang.String[] prms(java.lang.String filename) throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateReturn the file permission of the file/directory listed in the argument from the remote server.- Overrides:
prmsin classMultiClientState- Returns:
- permissions
- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
get
protected void get(java.lang.String localPath, java.lang.String remoteFile, int inRate, long offset, long size, int numDFEncoders, int blockSize, int unitSize, int mode) throws unlimited.core.util.common.exception.FCException, java.io.IOException, java.security.NoSuchAlgorithmException- Overrides:
getin classMultiClientState- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOExceptionjava.security.NoSuchAlgorithmException
-
isCancelled
protected boolean isCancelled()
- Overrides:
isCancelledin classMultiClientState
-
getData
protected TransferMechanismData getData()
-
applyRemoteFileAttributesToLocalFile
protected void applyRemoteFileAttributesToLocalFile(java.nio.file.Path localFile, java.lang.String remoteFile) throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateApplies the remote file attributes to the local file instance.- Overrides:
applyRemoteFileAttributesToLocalFilein classMultiClientState- Parameters:
localFile- Path of the local file that you wish to changeremoteFile- Path of the remote tile that you would like the attributes from- Throws:
java.io.IOExceptionunlimited.core.util.common.exception.FCException
-
getTransferRate
protected int getTransferRate()
- Overrides:
getTransferRatein classMultiClientState
-
getBlastRate
protected int getBlastRate()
- Overrides:
getBlastRatein classMultiClientState
-
getServerAgentID
protected java.lang.String getServerAgentID()
- Overrides:
getServerAgentIDin classMultiClientState
-
setSessionID
protected void setSessionID(java.lang.String sessionID)
- Overrides:
setSessionIDin classMultiClientState
-
resetSession
protected void resetSession() throws unlimited.core.util.common.exception.FCException, java.io.IOException- Overrides:
resetSessionin classMultiClientState- Throws:
unlimited.core.util.common.exception.FCExceptionjava.io.IOException
-
getSessionCount
protected int getSessionCount()
- Overrides:
getSessionCountin classMultiClientState
-
getCompFileFilter
protected java.lang.String getCompFileFilter()
- Overrides:
getCompFileFilterin classMultiClientState
-
getTransferEmptyDirectories
protected boolean getTransferEmptyDirectories()
- Overrides:
getTransferEmptyDirectoriesin classMultiClientState
-
getPostURL
protected java.lang.String getPostURL()
- Overrides:
getPostURLin classMultiClientState
-
getMd5RateLimit
protected int getMd5RateLimit()
- Overrides:
getMd5RateLimitin classMultiClientState
-
getRenameExtension
protected boolean getRenameExtension()
- Overrides:
getRenameExtensionin classMultiClientState
-
setClientWorkingPath
protected void setClientWorkingPath(java.nio.file.Path clientWorkingPath)
- Overrides:
setClientWorkingPathin classMultiClientState
-
setClientName
protected void setClientName(java.lang.String clientName)
- Overrides:
setClientNamein classMultiClientState
-
getClientName
protected java.lang.String getClientName()
- Overrides:
getClientNamein classMultiClientState
-
setClientAgentID
protected void setClientAgentID(java.lang.String clientAgentID)
- Overrides:
setClientAgentIDin classMultiClientState
-
setUserRelativePriority
public void setUserRelativePriority(int priority)
- Overrides:
setUserRelativePriorityin classMultiClientState
-
isTransferEmptyDirectories
protected boolean isTransferEmptyDirectories()
- Overrides:
isTransferEmptyDirectoriesin classMultiClientState
-
getFileFilter
protected FileCatalystFileFilter getFileFilter()
- Overrides:
getFileFilterin classMultiClientState
-
setTransferMode
protected void setTransferMode()
-
getUserEmailAddress
protected java.lang.String getUserEmailAddress() throws java.io.IOExceptionDescription copied from class:MultiClientStateGet The User's Email Address When Called- Overrides:
getUserEmailAddressin classMultiClientState- Returns:
- - A string containing the user's email address
- Throws:
java.io.IOException- - If there are issues an exception will be thrown
-
getUserFullName
protected java.lang.String getUserFullName() throws java.io.IOExceptionDescription copied from class:MultiClientStateGet The User's Full Name When Called- Overrides:
getUserFullNamein classMultiClientState- Throws:
java.io.IOException
-
sendWeblink
protected WeblinkResult sendWeblink(WeblinkDataContainer dataDO) throws unlimited.core.util.common.exception.FCException, java.io.IOException
Description copied from class:MultiClientStateCreates a weblink with the parameters provided by the client. Currently supported method for data creation- Overrides:
sendWeblinkin classMultiClientState- Returns:
- Data object containing the results of the weblink creation
- Throws:
unlimited.core.util.common.exception.FCException- if a FileCatalyst protocol error occurs.java.io.IOException- if an error occurs either connecting to the destination server, or if a transfer I/O error occurs.
-
sendWeblink
@Deprecated protected WeblinkResult sendWeblink(java.util.List<java.lang.String> to, java.lang.String from, java.lang.String message, java.util.Set<java.lang.String> files) throws unlimited.core.util.common.exception.FCException, java.io.IOException
Deprecated.Description copied from class:MultiClientStateMethod for creating a Weblink on FC Servers.- Overrides:
sendWeblinkin classMultiClientState- Parameters:
to- List of to email addresses that you would like to send the link tomessage- Message contained in the email that is sent outfiles- File listing that you wish to include the link. All files are relative to connected user home- Returns:
- Data object containing the results of the weblink creation
- Throws:
unlimited.core.util.common.exception.FCException- if a FileCatalyst protocol error occurs.java.io.IOException- if an error occurs either connecting to the destination server, or if a transfer I/O error occurs.
-
getUserPermissions
protected UserPermissionsContainer getUserPermissions() throws unlimited.core.util.common.exception.FCException, java.io.IOException
Description copied from class:MultiClientStateGather's the user's permissions- Overrides:
getUserPermissionsin classMultiClientState- Returns:
- Throws:
unlimited.core.util.common.exception.FCException- if a FileCatalyst protocol error occurs.java.io.IOException- if an error occurs either connecting to the destination server, or if a transfer I/O error occurs.
-
isLinkEnabledOnServer
public boolean isLinkEnabledOnServer() throws unlimited.core.util.common.exception.FCException, java.io.IOExceptionDescription copied from class:MultiClientStateRequest if link is enabled on the server that you are connected too- Overrides:
isLinkEnabledOnServerin classMultiClientState- Returns:
- Throws:
java.io.IOException- if an error occurs either connecting to the destination server, or if a transfer I/O error occurs.unlimited.core.util.common.exception.FCException
-
uploadRange
protected void uploadRange(java.nio.file.Path localFile, java.lang.String remoteFile, long offset, long length) throws java.io.IOExceptionDescription copied from class:MultiClientStateUploads a range of rate for the given file- Overrides:
uploadRangein classMultiClientState- Parameters:
localFile- The file the patch will be drawn fromremoteFile- The file to be patchedoffset- Starting byte for the patchlength- Length of the patch- Throws:
java.io.IOException- Problems with the transfer
-
downloadRange
protected void downloadRange(java.nio.file.Path localFile, java.lang.String remoteFile, long offset, long length) throws java.io.IOExceptionDescription copied from class:MultiClientStateDownloads a range of rate for the given file- Overrides:
downloadRangein classMultiClientState- Parameters:
localFile- The file the patch will be drawn fromremoteFile- The file to be patchedoffset- Starting byte for the patchlength- Length of the patch- Throws:
java.io.IOException- Problems with the transfer
-
getServerConfigurationValue
public java.lang.String getServerConfigurationValue(java.lang.String value) throws java.io.IOExceptionDescription copied from class:MultiClientStateRequest if link is enabled on the server that you are connected too- Overrides:
getServerConfigurationValuein classMultiClientState- Returns:
- Throws:
java.io.IOException- if an error occurs either connecting to the destination server, or if a transfer I/O error occurs.
-
getAllAvailableServerConfigs
public ServerConfigs getAllAvailableServerConfigs() throws java.io.IOException
Description copied from class:MultiClientStateRequest if link is enabled on the server that you are connected too- Overrides:
getAllAvailableServerConfigsin classMultiClientState- Returns:
- Throws:
java.io.IOException- if an error occurs either connecting to the destination server, or if a transfer I/O error occurs.
-
modtime
protected void modtime(FileListDataItem item) throws java.io.IOException
Description copied from class:MultiClientStateThis will update the modtime of the file existing on the server to whatever the incoming FileListDataItem is set to- Overrides:
modtimein classMultiClientState- Parameters:
item- - item with a modification time to be sent to the server;- Throws:
java.io.IOException
-
runWorkerClient
public void runWorkerClient(FileTransferMechanismHandler handler) throws java.lang.Exception
- Overrides:
runWorkerClientin classMultiClientState- Throws:
java.lang.Exception
-
isAutoUnzip
protected boolean isAutoUnzip()
- Overrides:
isAutoUnzipin classMultiClientState
-
setAutoUnzip
protected void setAutoUnzip(boolean autoUnzip)
- Overrides:
setAutoUnzipin classMultiClientState
-
setTaskID
protected void setTaskID(java.lang.String taskID)
- Overrides:
setTaskIDin classMultiClientState
-
setUserEmailAddress
protected void setUserEmailAddress(java.lang.String newEmailAddress) throws java.io.IOExceptionDescription copied from class:MultiClientStateSets The User's Email Address When Called- Overrides:
setUserEmailAddressin classMultiClientState- Parameters:
newEmailAddress- - The New Email To Be Set- Throws:
java.io.IOException
-
setUserFullName
protected void setUserFullName(java.lang.String newFullName) throws java.io.IOExceptionDescription copied from class:MultiClientStateSet's The User's Name When Called- Overrides:
setUserFullNamein classMultiClientState- Throws:
java.io.IOException
-
setForceFileOwnershipEnabled
protected void setForceFileOwnershipEnabled(boolean isForceFileOwnershipEnabled)
- Overrides:
setForceFileOwnershipEnabledin classMultiClientState
-
setForceFileOwnershipUser
protected void setForceFileOwnershipUser(java.lang.String forceFileOwnershipUser)
- Overrides:
setForceFileOwnershipUserin classMultiClientState
-
setForceFileOwnershipGroup
protected void setForceFileOwnershipGroup(java.lang.String forceFileOwnershipGroup)
- Overrides:
setForceFileOwnershipGroupin classMultiClientState
-
initSession
protected void initSession()
- Overrides:
initSessionin classMultiClientState
-
-