Class MultiClientManager

  • All Implemented Interfaces:
    java.lang.AutoCloseable, FileListDataItemSource, RemoteFileSystemSource, FileTransferData, FileTransferMechanism

    public class MultiClientManager
    extends java.lang.Object
    implements FileTransferMechanism
    The MultiClientManager is a pooled client solution to transfers. It allows for an easy way to launch and monitor multiple transfers, auto archive small files. This MultiClientManager can be used like the FCClient, initializing it the same way, using the TransferHook to monitor the transfer It also supports a new state machine driven infrastructure allowing it to automate much of the work while allowing you to "plug in" with an event dispatch system Here is an example of a simple upload all files in the working directory with all of the skeleton code that shows different methods of handling different system events such as jobs complete, changes of state, jobs failed, in transit etc ... The code shows the old way of doing things with the TransferHook and a while() loop, but also shows how a MultiClientListenerAdapter can be added to the MultiClientManager and things can be handled that way. All that would be needed in this code to upload a vector of files however would be to call initializeManager() and simpleUpload(Vector files), there is no longer a need to call initialize(), connect() and login() first, they are handled by the internal state machine.
     
     MultiClientManager m;
    
     public void initializeManager(){ //only call this method once
     		m = new MultiClientManager("localhost",21,20);
     		m.setUserName("user");
     		m.setPassword("pwd");
     		m.addMultiClientListener(getMultiClientListener());
     }
    
     public void simpleUpload(Vector<Path> files){
     		TransferHook hook;
     		try{
     		 	hook = m.upload(files);
     			while (!hook.isTransferCancelled() && !hook.isTransferComplete() && !hook.isTransferError()) {
    				Thread.sleep(200);
    			}
     		} catch (MultiClientState.StateMachineException e){
     			MultiClientState illegalState = e.cause();
          	//handle the illegal state preferably with a StateHandler.Adapter
          	//StateHandler stateHandler = getStateMachineExceptionStateHandler();
          	//illegalState.getHandledBy(stateHandler);
     		}
     }
      public MultiClientListenerAdapter getMultiClientListener(){
     		MultiClientListenerAdapter listener = new MultiClientListenerAdapter(){
    			public void handleStateMachineEvent(MultiClientEvent.StateMachineEvent evt) {
    				//handle the state machine event, preferably with a StateHandler.Adapter
    				//StateHandler stateHandler = getStateHandler();
          		//evt.getNewValue().getHandledBy(stateHandler);
    			}
    			public void handleJobAddedToQueueEvent(TransferJobAddedToJobQueueEvent evt) {
    				//handle the Job event preferably with a TransferJob.JobHandler
    				//TransferJob.JobHandler handler = getJobAddedHandler();
    				//evt.getNewValue().getHandledBy(handler);
    			}
    			public void handleJobTransferringEvent(TransferJobTransferringEvent evt) {
    				//handle the Job event preferably with a TransferJob.JobHandler
    				//TransferJob.JobHandler handler = getJobTransferringHandler();
    				//evt.getNewValue().getHandledBy(handler);
    			}
    			public void handleJobTransferSuccessEvent(TransferJobTransferSuccessEvent evt) {
    				//handle the Job event preferably with a TransferJob.JobHandler
    				//TransferJob.JobHandler handler = getJobSuccessHandler();
    				//evt.getNewValue().getHandledBy(handler);
    			}
    			public void handleFileTransferFailureEvent(TransferJobTransferFailureEvent evt) {
    				//handle the Job event preferably with a TransferJob.JobHandler
    				//TransferJob.JobHandler handler = getJobFailureHandler();
    				//evt.getNewValue().getHandledBy(handler);
    			}
    			public void handleJobTransferRejectionEvent(TransferJobTransferRejectionEvent evt) {
    				//handle the Job event preferably with a TransferJob.JobHandler
    				//TransferJob.JobHandler handler = getJobRejectedHandler();
    				//evt.getNewValue().getHandledBy(handler);
    			}
     		};
       }
     
     
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
        MultiClientManager​(java.lang.String remoteServer, int poolsize)
      Constructs an un-initialized, un-connected MultiClientManager object.
        MultiClientManager​(java.lang.String remoteServer, int port, int poolsize)
      Constructs an un-initialized, un-connected MultiClientManager object.
      protected MultiClientManager​(java.lang.String remoteServer, int port, ClientFactory fact)
      Constructs an un-initialized, un-connected MultiClientManager object.
      protected MultiClientManager​(java.lang.String remoteServer, ClientFactory fact)
      Constructs an un-initialized, un-connected FCClient object.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addCustomLogHandler​(java.util.logging.Handler handler)
      Adds a custom log handler to which API logs will be published.
      void addFocusedDelta​(unlimited.core.util.common.tuples.Quintet<java.lang.String,​java.lang.Long,​java.lang.Long,​java.lang.Long,​java.util.concurrent.TimeUnit> focusedDelta)
      Adds a focused delta to the Multi-Client's post process.
      void addMultiClientListener​(MultiClientListenerAdapter listener)
      Adds the property change listener.
      void addPostprocess​(PostProcessor<?> processor)
      Adds a PostProcess to the client's current processor list
      void addPreprocess​(PreProcessor processor)
      Adds a PreProcessor to the clien's current processor list
      void addProcessEventListener​(ProcessEventDispatch.ProcessEventListener listener)
      Adds an event listener that is triggered when PreProcessor and PostProcessor triggers
      void addRetransferDelta​(unlimited.core.util.common.tuples.Triplet<java.lang.String,​java.lang.Long,​java.util.concurrent.TimeUnit> retransferDelta)
      Adds a re-transfer delta PostProcessor that re-transfers deltas after a file succeeds
      <T> java.util.stream.Stream<T> addStream​(java.util.stream.Stream<T> stream)
      Adds a stream into the current stream list
      void addWaitForGrowth​(unlimited.core.util.common.tuples.Triplet<java.lang.String,​java.lang.Long,​java.util.concurrent.TimeUnit> waitForGrowth)
      Adds a wait for file growth PreProcessor that waits for a file to stop growing before it's transferred
      void applyRemoteFileAttributesToLocalFile​(java.nio.file.Path localFile, java.lang.String remoteFile)
      Applies the remote file attributes to the local file instance.
      void autoDetectConectionMode()
      Tests what type of connection mode should be used for the transfer.
      void autoDetectConectionModeDownload()
      This method will attempt to detect the optimal connection method based on the provided server information, HTTP servlet location, and ports.
      void autoDetectConectionModeDownload​(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.
      void autoDetectConectionModeUpload()
      This method will attempt to detect the optimal connection method based on the provided server information, HTTP servlet location, and ports.
      void autoDetectConectionModeUpload​(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.
      void autoDetectConectionModeUploadAndDownload()
      This method will attempt to detect the optimal connection method based on the provided server information, HTTP servlet location, and ports.
      void autoDetectConectionModeUploadAndDownload​(boolean portFallback)
      This method will attempt to detect the optimal connection method based on the provided server information, HTTP servlet location, and ports.
      boolean bumpPriority​(java.lang.String path)
      Bump the priority of a given pending file to the head of the pending list
      boolean canAcceptWork()
      Returns whether or not the Multi-Manager has room in the work queueu
      protected void cancelJobs()
      Takes the pending jobs and adds them to the unattempted job list
      void cd​(java.lang.String path)
      Sets the current remote working directory to the specified path.
      void cdup()
      Move up one directory on the remote directory structure.
      void checkTimeout()
      Deprecated.
      protected void cleanupClient​(FileTransferMechanism client)
      Cleans up the client if it is needed
      boolean clientsCanStillTransfer()
      Returns whether or not the client can still transfer
      void close()
      Closes the Manager, and finishes the connection.
      protected void closeAllStreams()  
      protected void closeResources()
      Shuts and cancels the Multi-Manager's current resources
      void completeClientFailure​(TransferJob job, TransferHook hook)
      Method that handles marks failed transfers, and fires the corresponding TransferJobFailureEvents.
      void connect()
      Connect to the FileCatalyst server.
      boolean connected()
      Returns true if connected
      WeblinkResult createWeblink​(java.util.List<java.lang.String> to, java.lang.String subject, java.lang.String message, java.util.Set<java.lang.String> files)
      Deprecated.
      WeblinkResult createWeblink​(java.util.List<java.lang.String> to, java.lang.String subject, java.lang.String message, FileListData files)
      Deprecated.
      WeblinkResult createWeblink​(WeblinkDataContainer data)
      Creates a weblink on the FileCatalyst Server with the parameters provided by the client.
      protected boolean createWorkerThreads()
      Creates the worker threads to be used by this Multi-Client instance
      void delete​(java.lang.String file)
      Deletes the specified file from the remote file system.
      java.util.stream.Stream<unlimited.core.util.common.tuples.Pair<FileListDataItem,​java.lang.Boolean>> delete​(java.util.stream.Stream<FileListDataItem> toDelete)
      Deletes a stream of files on the Server.
      void deleteAll​(java.util.List files)
      Delete all specified files in a single efficient command.
      void deleteAll​(java.util.List<java.lang.String> files, boolean ftpDelete)
      Delete all specified files in a single efficient command.
      void deleteAll​(FileListData files)
      Delete all specified files in a single efficient command.
      void deleteAll​(FileListDataItem[] files)
      Delete all specified files in a single efficient command.
      void deRegisterStateSignal​(StateSignal signal)
      De-registers the specified state signal and makes it so it is no longer called system when the state is entered
      void disconnect()
      Disconnect from the server.
      protected void doDisconnect()
      Method that contains the functionality to disconnect the clients from the system
      protected void doJob​(TransferRunner runner)
      Calls the current state to execute the supplied runner.
      protected int doTestAproximateDownloadSpeed()
      Tests the approximate download speed by using the tester client
      protected int doTestAproximateUploadSpeed()
      Tests the approximate upload speed by using the tester client
      protected int doTestMaxDownloadSpeed()
      Performs a series of tests to determine the maximum download speed from the connected server.
      protected int doTestMaxUploadSpeed()
      Performs a series of tests to determine the maximum upload speed from the connected server.
      protected int doTestWriteSpeed()
      Perform a write to current directory with recommended values for determining storage rate.
      protected int doTestWriteSpeed​(java.nio.file.Path file, int size, int timeout)
      Perform a write to specified file with specified size and timeout for determining storage rate.
      TransferHook download​(java.lang.String remoteFile)
      Download a the specified file to the current local working directory.
      TransferHook download​(java.lang.String remoteFile, java.lang.String localPath)
      Download the specified file to the specified local path.
      TransferHook download​(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.
      TransferHook download​(java.util.List<java.lang.String> files, java.lang.String localPath)
      Downloads the files as specified by the paths (in String format) contained in the specified vector to the current working directory.
      TransferHook download​(java.util.List<java.lang.String> files, java.lang.String localPath, java.lang.String transferUniqueID)
      Downloads the files as specified by the paths (in String format) contained in the specified vector to the current working directory.
      TransferHook download​(java.util.List<java.lang.String> files, java.lang.String localPath, java.lang.String transferUniqueID, boolean needsRecurse)  
      TransferHook download​(FileListData files)
      Downloads the files specified in the FileListData object to the current local working directory.
      TransferHook download​(FileListData files, java.lang.String localPath)
      Downloads the files specified in the FileListData object to the specified path.
      TransferHook download​(FileListData files, java.lang.String localPath, java.lang.String transferUniqueID)
      Downloads the files specified in the FileListData object to the specified path.
      TransferHook download​(FileListData files, java.lang.String localPath, java.lang.String transferUniqueID, boolean needsRecurse)
      Downloads the files specified in the FileListData object to the specified path.
      TransferHook downloadAs​(java.lang.String remoteFile, java.lang.String localFile)
      Download the specified file to the specified local file.
      TransferHook downloadAs​(java.lang.String remoteFile, java.nio.file.Path localFile, java.lang.String transferUniqueID)
      Download the specified file to the specified local file.
      TransferHook downloadAs​(FileListDataItem remoteFile, java.nio.file.Path localFile, java.lang.String transferUniqueID)
      Download the specified file to the specified local file.
      void downloadRange​(java.nio.file.Path localFile, java.lang.String remoteFile, long offset, long length)
      Downloads a range of information from the remote file.
      void downloadStream​(java.util.stream.Stream<FileListDataItem> stream)
      Downloads the provided stream from the currently connected Server.
      protected void endJob​(FileTransferMechanism client, TransferJob job, TransferHook hook)
      Method that performs the necessary logic for processing TransferJob that has completed.
      boolean exists​(java.lang.String remoteFile)
      Test if the remote file, denoted by the given remote path, exists on the server and returns true if it exists, false otherwise.
      unlimited.core.util.common.AutoClose<unlimited.core.util.common.stream.PairStream<java.lang.String,​java.lang.Boolean>> exists​(java.util.stream.Stream<java.lang.String> nameStream)
      Queries the Server for existence of all files in the provided stream.
      void exportFile​(java.nio.file.Path aFile)
      Export all settings to a properties file
      java.util.Properties exportProperties()
      Export all settings to a properties object
      boolean filesMatch​(java.nio.file.Path file, java.lang.String rFile)
      Verifies whether a local file matches a remote file using MD5 checksum
      boolean filesMatch​(java.nio.file.Path file, java.lang.String rFile, int md5RateLimit)
      Verifies whether a local file matches a remote file using MD5 checksum
      boolean filesMatch​(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 checksum
      boolean filesMatch​(java.nio.file.Path file, java.lang.String rFile, unlimited.core.util.common.CancelHandler cancelHandler)
      Verifies whether a local file matches a remote file using MD5 checksum
      java.util.List<FileSystemEvent> fileSystemEvents​(long timeout)
      Collects the list of file system events from the Server.
      void finish()
      Cleans up memory allocated by the native libraries component of FileCatalyst.
      protected void firePropertyChange​(java.beans.PropertyChangeEvent evt)
      Fires a PropertyChange event for all objects listening for them
      void flushAllInternals()  
      void flushCaches()
      Deletes underlying caches for file sizes and date/time stamps
      void flushDispatch()
      the event listening is handled asynchronously inside the multi client manager.
      void flushInternalTaskDispatch()
      Flushes the internal task dispatching system and causes the calling resource to wait until the resource has been flushed also change this comment
      void fsEvents()
      Prints out a list of the current file system events that are set on the server.
      void get​(java.lang.String localPath, java.lang.String remoteFile, int inRate, long offset, long size, int numDFEncoders, int blockSize, int unitSize, int mode)
      Downloads a file from the FC Server, and places it on the file system.
      java.util.List<java.lang.Integer> getActiveClientIDs()
      Gets the active client ID's each client in the pool is assigned an ID 0-n where n is the number of clients.
      java.util.HashSet<FileTransferMechanism> getActiveClientsCopy()
      Gets a list that contains an independent copy of a client objects that are currently performing work.
      java.util.Vector<TransferJob> getActiveJobs()
      Gets the currently active jobs that are being executed by this MultiClientManager.
      java.util.HashMap<java.lang.String,​? extends HandlerData> getActivePreProcessorInfo()
      Returns the active preprocessor info.
      ServerConfigs getAllAvailableServerConfigs()
      Returns all Server side configurations that the Client may be interested in.
      java.util.List<TransferJob> getAllWork()
      Returns ALL work that this MultiClient Manager has.
      MultiClientTransferringBandwidthManager getBandwidthManager()  
      int getBlastRate()
      Deprecated.
      Method deprecated.
      int getBlockSize()
      Return the current block size.
      FileCatalystClientCallbackHandler getCallbackHandler()
      Returns the currently set callback handler that will be used to confirm resume, overwrite and to do post processing
      java.lang.String getClientConnectKey()
      Returns the client connect key, used to connect to non-FileCatalyst servers
      java.util.function.Supplier<ClientCredentials> getClientCredentials()
      Returns the credentials supplier that is set for this client.
      int getClientIdentifier()
      Returns the identifier for this transfer mechanism.
      java.lang.String getClientName()
      Used for HotFolder Reporting, And CSV Reports
      protected com.google.common.collect.HashBiMap<java.lang.Integer,​FileTransferMechanism> getClients()
      Returns the current clients being used by the manager
      protected int getClientSubIdentifier()
      Returns the current sub identifier that identifies this client as a sub component of a broader group of client apps.
      protected FileTransferMechanism getClientUnderTest()
      Returns the client that is used for test operations.
      java.lang.String getCompFileFilter()
      Sets the compression FileFilter that is to be used by the implementation.
      int getCompLevel()
      Returns the current compression level (0 - 9).
      int getCompMethod()
      Returns the current compression method to be used during transfers.
      int getCompStrategy()
      Returns the current compression deflater strategy that will be used in the current compression method to minimize the data and compress into smaller byte values.
      int getCongCtrlStrategy()
      Returns the current congestion control strategy.
      int getCongestionControlAggression()
      Returns an aggression factor between 1 (passive) and 10 (aggressive) used by the congestion control mechanism to determine how passive or aggressive it should be in the face of network congestion.
      ConnectivityTestResultContainer getConnectivityTestResults()
      Returns a data container object that contains information about whether or not uploads, downloads or overall transfers will work for all available transfer modes.
      int getConnectTimeout()
      Return the connect timeout value (in milliseconds)
      MultiClientState getCurrentState()
      Gets the current state.
      TransferMechanismData getData()
      Returns the DataObject that contains all of the transfer settings for this MultiClientManager
      int getExtendedReadTimeout()
      This is the length of time in milliseconds the client will wait for a reply after sending a long running command (such as MD5, MKDLT, MKSIG, ZIP, UNZIP) to the FileCatalyst server.
      FileCatalystFileFilter getFileFilter()
      Returns the current file filter that is used to filter out information for a transfer.
      long getFileSizeThreshHold()
      Gets the file size thresh hold.
      int getFileTransferPriority()
      Returns the task file transfer priority
      java.lang.String getForceFileOwnershipGroup()
      Returns the groupname / groupID to be used when attempting to force group level ownership for files downloaded by the client.
      java.lang.String getForceFileOwnershipUser()
      Returns the username to be used when attempting to force file ownership for files downloaded by the client
      HandlerData getHandlerData​(java.lang.Integer id)  
      java.util.HashMap<java.lang.String,​HandlerData> getHandlerMap()  
      protected java.lang.Integer getIDForClient​(FileTransferMechanism client)  
      java.util.List<java.lang.Integer> getIdleClientIDs()
      Gets the idle client ID's.
      protected java.util.HashSet<FileTransferMechanism> getIdleClientsCopy()
      Creates and returns a mutable copy of the idle client list
      protected int getIdleRateSlice()  
      int getIncomingDataPort()
      Returns the port used for incoming UDP packets on downloads Only the first port will be returned in the case of v3.0 where multi-receive sockets have been enabled.
      int[] getIncomingDataPorts()
      Returns the list of ports used for incoming UDP packets on downloads
      int getIncrementalMode()
      Returns the current incremental mode.
      java.nio.file.Path getLocalWorkingDirectoryPath()  
      unlimited.core.util.common.logs.LogUtils getLogger()
      Returns the logger that is used
      java.lang.String getLogLocation()
      Returns the current location for the log files.
      int getMaxRetries()
      Returns the number of times to retry a broken or interrupted transfer.
      int getMaxWorkQueueRePush()  
      java.lang.String getMD5​(java.lang.String remote)
      Returns the MD5 checksum for the specified remote file if it exists
      java.lang.String getMD5Checksum​(java.lang.String rFile)
      Returns the MD5 checksum for the given remote file
      int getMd5RateLimit()
      Returns the current MD5 that is set.
      int getMode()
      The current transfer mode of this client.
      ThreadSafeMultiHook getMultiHook()
      Gets an updated representation of the MultiClientTransferHook getTransferHook().
      protected TransferJob getNextJob()
      Returns the next job to be attempted by this object
      int getNumBlockReaders()
      Returns the number of block reader threads.
      int getNumBlockWriters()
      Returns the number of block writer threads.
      int getNumFTPStreams()
      Returns the number of concurrent streams that will be used for FTP transfers
      int getNumPacketProcessors()
      Return the current number of packet processor threads.
      int getNumReceiveSockets()
      Returns the current number of receive sockets.
      int getNumSenderSockets()
      Return the number of Sender sockets to use
      int getNumSenderThreads()
      Returns the number of threads that will be used at most for each FC transmission.
      int getNumThreads()
      Returns the number of threads that will be used at most for each FC transmission.
      int getNumUDPSockets()
      Return the number of Sender sockets to use
      java.util.Observer getObserver()
      Returns the Observer that is currently set.
      int getPacketQueueDepth()
      Return the current packet queue depth.
      int getPacketSize()
      Returns the current packet size in bytes.
      java.util.Vector<TransferJob> getPendingJobs()
      Gets the pending jobs.
      int getPendingWorkCount()
      Gets the pending work count.
      int getPoolSize()
      Returns the number of clients this MultiClient manager has access to
      java.util.Collection<PostProcessor<?>> getPostProcessors()  
      PostTaskSentData getPostTaskSentData()
      Returns the current post task sent data
      java.lang.String getPostURL()
      Returns the current post URL to use
      java.util.Collection<PreProcessor> getPreProcessors()  
      int getProgressiveTimeout()
      Returns the current progressive timeout value.
      java.lang.String getProgressiveTimeoutFilter()
      Returns the current progressive timeout filter.
      RateDistributer getRateDistributer()  
      protected java.lang.Runnable getRateUpdater()  
      int getReadBufferSizeKB()
      Return the current read buffer size, in KB Value zero (0) indicates read buffer is dictated by the network block size.
      FileTransferMechanism getReadOnlyClient​(java.lang.Integer id)
      Gets the read only client.
      FileTransferMechanism getReadOnlyFromMasterClient()
      Returns a read-only client that provides read access.
      int getReadTimeout()
      This is the length of time in milliseconds the client will wait for a reply after sending a command to the FileCatalyst server.
      protected java.lang.String getRealPwd()
      Returns the current working directory for the remote connection.
      int getRemotePort()
      Gets the remote port to which this client will be connected.
      java.lang.String getRemoteServer()
      This method returns the remote server / hostname to which this client is connected.
      boolean getRenameExtension()
      Returns whether or not the rename extension will be used.
      unlimited.fc.reporting.MultiClientDataReport getReport()
      this returns the report that was filled by the FCClientEngine.
      unlimited.fc.reporting.MultiClientReportWriter getReportWriter()
      For Testing Purposes Only
      RollingStartRate getRollingStartRate()  
      java.lang.String getServerAgentID()
      Returns the server's current agent ID.
      java.lang.String getServerConfigurationValue​(java.lang.String value)
      Gets an individual Server configuration value from the Server.
      int getServerLinkExpiryDayValue()
      Returns the number of days that the server has configured for links to be stored.
      int getServerOverrideBandwidth()
      Returns the override bandwidth value that has been specified by server.
      java.lang.String getServletLocation()
      FileCatalyst has the ability to upload using the HTTP/S protocol as long as the FileCatalyst Servlet application is installed and properly configured.
      int getServletMultiplier()
      When uploading in HTTP mode using FileCatalyst Servlet, this option allows the upload buffer size to be tuned.
      int getSessionCount()
      Returns the current number of active sessions that the implementation has
      java.lang.String getSessionID()
      Returns the current session ID of the implementation
      SessionManageMode getSessionManageMode()
      Returns the current session management mode that is used for this Manager instance
      unlimited.core.util.common.net.ssl.FCSSLSocketProducerImpl getSSLSocketProducer()
      Retrieves the implementation that will be used to generate SSL sockets
      int getStartRate()
      Returns the current start rate for FC transfers.
      java.util.function.Supplier<java.lang.String> getStickySessionID()
      Returns the current supplier that is used to generate the unique sticky session identifier that the FileCatalyst Client use when the connect to the FileCatalyst LoadBalancer
      FileTransferMechanism getSynchedClient()
      Gets the synched client.
      int getTargetRate()
      Returns the current target rate for this client.
      protected int getTargetRateSlice()  
      java.lang.String getTaskID()
      Returns the current task ID
      int getTempMode()
      Returns the temporary mode for the implementation
      TransferMechanismData getTransferData()
      Returns a clone of the data object that contains all of the transfer settings for this MultiClientManager
      boolean getTransferEmptyDirectories()
      Returns whether not the implementation is set to transfer empty directories.
      PostURLTransfer.TransferHolder getTransferHolder()  
      MultiClientTransferHook getTransferHook()
      Gets the Master Transfer hook.
      int getTransferRate()
      Returns the implementation's current transfer rate
      protected int getTransferringRateSlice()  
      int getUnitSize()
      Use getPacketSize
      java.lang.String getUserEmailAddresss()
      Gets the connected user's email address when called
      java.lang.String getUserFullName()
      Get The User's Full Name When Called
      UserPermissionsContainer getUserPermissions()
      Gather's the current user's permissions that are enabled on the server.
      int getUserRelativePriority()
      This priority hint is to help the server distribute bandwidth within its own set parameters.
      int getVerifyMode()
      Returns the current integrity verification mode.
      long getWaitRetry()
      Returns the amount of milliseconds to wait between retries for failed transfers.
      int getWriteBufferSizeKB()
      Return the current write buffer size.
      java.lang.String getWriteFileMode()
      Gets the file write mode set Client application will use these values for downloads only.
      long getZipFileSizeLimit()
      Returns the zip file size limit in bytes.
      void handleCurrentState​(StateHandler handler)
      Calls the state handler to handle the current state.
      protected void handleFailedTransfer​(TransferHook hook, FileTransferMechanism client, TransferJob job)
      Handles a failed transfer event when called.
      protected void handleSuccessfulTransfer​(TransferHook hook, FileTransferMechanism client, TransferJob job)
      Handles a successful transfer event when called.
      protected void handleTransferStart​(TransferHook hook, TransferRunner runner)
      Method that performs the operations relating to transfer start.
      protected void handleTransferStop​(TransferHook hook, TransferRunner runner)
      Method that performs the operations relating to transfer stop.
      boolean hasSignalRegistered​(StateSignal signal)
      Returns whether or not the state signal has been successfully registered to this MultiClient Manager instance
      boolean hasWork()
      Returns whether or not the Manager has active or pending work
      void importFile​(java.nio.file.Path aFile)
      This will overwrite all settings within this object, if the values are not present within this file, the values within this object are reset to defaults.
      void importProperties​(java.util.Properties props)
      This will overwrite all settings within this object, if the values are not present within the properties object, the values within this object are reset to defaults.
      void informTransferFinished()
      Sends a message to the server letting them know that transfer has finished
      void informTransferStart()
      Sends a message to the server letting them know that transfer has started
      <T> void initDeleteAfterTransfer​(unlimited.core.util.common.tuples.Pair<java.util.LinkedList<T>,​java.util.HashSet<T>> dirsToBeDeleted)
      Initializes the delete after transfer if it is needed.
      void initialize​(boolean generateUserLogs)
      Initialize FCClient object.
      protected void initializeManager()
      Initializes the Multi-Client Manager for work
      void initializeNoUserLogs()
      Initializes the TransferMechanism with no user logs
      protected void initReportWriter()
      Initializes the report writer it hasn't already been initalized by the system
      protected void initThreadSafeHook()
      Initializes the ThreadSafeMultiHook that is used to provide transfer information in Thread safe manner
      boolean isAutoMode()
      Returns whether or not the transfer mode has been set to TransferMode.AUTO
      boolean isAutoResume()
      Returns true if auto-resume is enabled.
      boolean isAutoUnzip()
      Returns true if auto unzip is enabled, false otherwise.
      boolean isAutoZip()
      Returns true if auto zip is enabled, false otherwise.
      boolean isBadState()
      Returns whether or not the current state is a bad state.
      boolean isCancelled()
      Returns whether or not the MultiClientManager has been cancelled
      boolean isCancelledDueToError()
      Returns whether or not the Manager was cancelled
      boolean isCancelledOrCancelling()
      Returns whether or not the Manager is currently canceling it's current transfers, or if it has completely cancelled it's work
      boolean isCancelling()
      Returns whether or not the manager is currently in a cancelling state
      boolean isCompressionEnabled()
      Returns true if compression is enabled, false otherwise.
      boolean isCongestionControlEnabled()
      Returns true if congestion control is currently enabled.
      boolean isCurrentStateConnected()
      Returns whether or not the FileTransferMechanism currently has a connection.
      boolean isCurrentStateInstanceof​(java.lang.Class<? extends MultiClientState>... states)  
      boolean isDebug()
      Returns true if debug is set to true.
      boolean isDeleteAfterTransfer()
      Returns true if the delete after transfer option is enabled, false otherwise.
      boolean isDowngradeModeOnReConnect()
      Returns true if the downgrade on reconnect option is enabled, false otherwise.
      boolean isFileCatalystServer()
      Returns true if connected to a FileCatalyst server.
      boolean isForceFileOwnershipEnabled()
      Returns true if the force file ownership feature is currently enabled.
      boolean isForceTCPmodeACKs()
      Returns true if TCP mode ACKs are enabled.
      boolean isIdle()
      Returns whether or not the Client is currently idle
      boolean isIncrementalSizeCheckOnly()
      Returns whether or not incremental has been set to use the size only option
      boolean isInitialized()
      Returns true if the last auto-detect that was performed identified that at least one mode of transfer was possible for the given type (upload, download, or both directions).
      boolean isMaintainLastModified()
      Returns true if Maintain last modified is enabled.
      boolean isMaintainPermissions()
      Returns true if maintain permissions is enabled.
      boolean isMoveToSent()  
      boolean isOptimizeBlockSize()
      Returns true if optimize block size feature is enabled.
      boolean isProcessing()
      Returns whether or not the MultiClientManager is currently pre/post processing files.
      boolean isProgressiveTransfers()
      Return true if the progressive option is enabled, false otherwise.
      boolean isServerOverridebandwidth()
      Returns whether or not the server has specified that the bandwidth should be overridden.
      boolean isShowConsoleLog()
      Returns true if console log is enabled.
      boolean isTransferComplete()
      Returns whether or not the MultiClientManager has completed it's current transfer.
      boolean isTransferEmptyDirectories()
      Returns whether or not the implementation should be transferring empty directories
      boolean isTransferWithTempName()
      Returns true if transferring with temporary names is enabled
      boolean isUDPSupported()
      Returns true if connected to a FileCatalyst server that supports UDP.
      boolean isUseCompression()
      Returns true if compression is enabled, false otherwise.
      boolean isUseCongestionControl()
      Returns true if congestion control is currently enabled.
      boolean isUseIncremental()
      Returns true if incremental feature is enabled
      boolean isUseSSL()
      Returns true if SSL mode is enabled, false otherwise.
      boolean isUsingDeleteAfterPostProcessor()
      Returns true if we are using the delete after post processor
      boolean isVerifyIntegrity()
      Returns true if integrity check is enabled.
      boolean isWeblinkEnabledOnServer()
      Request if link is enabled on the server that you are connected too
      void jobSuccess​(FileTransferMechanism client, TransferJob job, TransferHook hook)
      Method that handles marks successful transfers, and fires the corresponding TransferJobTransferSuccessEvent.
      int lastServerRestrictedRate()
      Returns the last rate (kbps) that the Server had replied with.
      FileListData list()
      Returns meta data for files in the current remote directory.
      FileListData list​(java.lang.String wildcard)
      Returns meta data for files in the current remote directory.
      FileListData list​(java.lang.String wildcard, java.lang.String remoteDirectory)
      Returns meta data for files that match the wildcard in the supplied directory.
      FileListData listNoParse​(java.lang.String directory)
      Returns a remote file listing with no parsing
      FileListData listRecursiveFTPCompatible​(java.lang.String directory)
      Method recursive lists files in an ftp compatible manner similar to FileTransferMechanism.listWithInlineParse()
      FileListData listWithInlineParse()
      Returns meta data for files in the current remote directory.
      FileListData listWithInlineParse​(java.lang.String directory)
      Returns meta data for files in the given remote directory.
      boolean loggedIn()
      Returns whether or not the TransferMechanism is currently logged into the server
      void login()
      Logs the Multi-Manager with the currently stored username and password
      void login​(java.util.function.Supplier<ClientCredentials> creds)
      Login to the server with the specified credentials.
      void mkdir​(java.lang.String dir)
      Creates the specified directory on the remote file system.
      void modtime​(FileListDataItem item)
      This will update the modtime of the file existing on the server to whatever the incoming FileListDataItem is set to
      protected void moveClientToActive​(FileTransferMechanism client)
      Moves the client to the current active list.
      protected void moveClientToIdle​(FileTransferMechanism client)
      Moves the client to idle list.
      void noop()
      Sends a small command to the server to see if it still can be reached.
      protected void nullClients()
      Resets all information by clearing all internal clients (idle, worker, and transferring), and the main transferhook.
      java.lang.String[] prms​(java.lang.String filename)
      Return the file permission of the file/directory listed in the argument from the remote server.
      MultiClientTransferHook pushJob​(TransferJob job)
      Queries the internal state machine to add a TransferJob into the current queue of pending work.
      MultiClientTransferHook pushJobNoProcessing​(TransferJob job)
      Pushes a new TransferJob into the current TransferJobQueue.
      protected MultiClientTransferHook pushJobOntoWorkQueue​(TransferJob job)
      Pushes a new TransferJob into the current queue.
      java.lang.String pwd()
      Returns the current remote working directory.
      java.lang.String quote​(java.lang.String command)
      Issue arbitrary FileCatalyst commands to the FileCatalyst server.
      void refreshMaster()
      Refreshes the master client by disconnecting and reconnecting into the present working directory
      void registerStateSignal​(StateSignal signal)
      This state signal being registered will be signaled when the multi client manager enters an instance of that signal type
      java.util.stream.Stream<FileListDataItem> remoteSynchFile​(java.util.stream.Stream<FileListDataItem> fileStream)
      Syncs a stream of FileListDataItem objects with it's current remote information.
      void remoteSynchFile​(FileListDataItem aFile)
      Syncs a FileListDataItem object with it's current remote information.
      TransferHook remoteUpload​(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).
      TransferHook remoteUpload​(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).
      void removeActiveJob​(TransferJob job)
      Removes the active job from pending jobs list and the main filter
      void removePropertyChangeListener​(java.beans.PropertyChangeListener listener)
      Removes the property change listener.
      void removeStream​(java.util.stream.Stream<?> stream)
      Removes the stream from current stream list
      void rename​(java.lang.String oldName, java.lang.String newName)
      Renames the specified file to the new name.
      void requestCancel()
      Requests the Multi-Client Manager to cancel the current transfer.
      void requestUpdateServerOverrides()
      Queries the currently connected Server to provide it's currently overridden bandwidths.
      void resetAutoDetectInfo()
      Resets all Auto-detect information.
      protected void resetPooledClientIfNeeded​(FileTransferMechanism client)
      Resets the provided FileTransferMechanism by clearing it's information and throwing it back into the WorkerPool of clients responsible for grabbing work for the currently pending queue.
      void resetSession()
      Resets the session when called.
      void resetStickySessionProducer()  
      protected void returnJob​(TransferJob job)
      Returns the supplied the TransferJob to the queue
      protected void returnJob​(TransferJob job, TransferHook hook)
      Returns the supplied the TransferJob to the queue
      void rmdir​(java.lang.String dir)
      Deletes the specified directory from the remote file system.
      void rmdirRecursive​(FileListDataItem fileListDataItem)
      Deletes a directory on the server in a recursive manner.
      protected void runWorkerClient​(FileTransferMechanismHandler handler)
      This allows you to use the worker client to perform operations that don't interfere with the transferring clients
      protected boolean safeSynchClient​(FileTransferMechanism client)
      Safely syncs the client to the system.
      protected void scheduleHookUpdate()
      Schedules an asynchronous update for the MultiClientManager's TransferHook information.
      java.util.List<unlimited.core.util.common.tuples.Pair<java.lang.String,​TransferJobPriority>> searchPending​(java.lang.String filter, int limit)
      Searches the pending work list and returns all results that match the supplied filter
      void sendEmail​(java.lang.String emailAddress, int emailConst, java.lang.String emailText)
      Sends an email with the specified information.
      boolean serverSupportsFSEvents()
      This returns true if the server supports file system events.
      java.lang.String serverVersion()
      Returns the FileCatalyst server version.
      void setAutoArchivingSpecificCompressionData​(CompressionData autoArchivingSpecificCompressionData)
      Sets the auto archiving specific compression data.
      void setAutoConnectClientFactory​(java.util.function.Supplier<FileTransferMechanism> fact)  
      void setAutoResume​(boolean autoResume)
      Enables/disables auto resume feature.
      void setAutoUnzip​(boolean autoUnzip)
      Enables/disables auto unzip feature.
      void setAutoZip​(boolean autoZip)
      Enables/disables auto zip feature.
      void setBandwidthManager​(MultiClientTransferringBandwidthManager bandwidthManager)  
      void setBlockSize​(int blockSize)
      Set the block size.
      void setCallbackHandler​(FileCatalystClientCallbackHandler callbackHandler)
      Sets a callback handler that will be used to confirm resume, overwrite and to do post processing
      protected void setCancelled()
      Calls the Manager to asynchrously cancel it's current transactions and close all available resources.
      void setClientAgentID​(java.lang.String clientAgentID)
      Sets the current client agent ID to the new specified value.
      void setClientConnectKey​(java.lang.String clientConnectKey)
      This key must be set in order to connect to non-FileCatalyst servers.
      void setClientCredentials​(java.util.function.Supplier<ClientCredentials> creds)
      Sets the credentials supplier for this connection.
      void setClientIdentifier​(int clientIdentifier)
      An ID value that identifies this client to the FileCatalyst Server.
      void setClientName​(java.lang.String clientName)
      Sets the current client name to the value that is specified
      void setClientString​(java.lang.String clientString)
      Set a text string that will be displayed on the server UI to identify this client.
      void setClientSubIdentifier​(int id)
      Sets an ID that further identifies this client
      void setClientWorkingPath​(java.nio.file.Path clientWorkingPath)
      Sets the client's current working path to the value specified
      void setCompFileFilter​(java.lang.String compFileFilter)
      Sets the compression FileFilter that is to be used by the implementation
      void setCompLevel​(int compLevel)
      Sets the compression level (0 - 9 with default of 4).
      void setCompMethod​(int compMethod)
      Sets the current compression method to be used during transfers.
      void setCompressionEnabled​(boolean enable)
      Enables/disables on the fly compression.
      void setCompStrategy​(int compStrategy)
      Sets the compression deflater strategy that will be used within the compression method to minimize the data and compress into smaller byte values.

      void setCongCtrlStrategy​(int congCtrlStrategy)
      Sets the congestion control strategy.
      void setCongestionControlAggression​(int congestionControlAggression)
      Specifies an aggression factor between 1 (passive) and 10 (aggressive) used by the congestion control mechanism to determine how passive or aggressive it should be in the face of network congestion.
      void setCongestionControlEnabled​(boolean enabled)
      Enables/disables congestion control for this client.
      void setConnectTimeout​(int millisec)
      Sets the connect timeout value (in milliseconds).
      protected void setCurrentState​(MultiClientState newState)
      Sets the manager's current state to the new provided state
      void setDataReportWriter​(unlimited.fc.reporting.CSVReportWriter reportWriter)
      Sets the CSVReportWriter that is used to write transfer reports to disk
      void setDebug​(boolean debug)
      Turns on debug mode.
      void setDeleteAfterTransfer​(boolean deleteAfterTransfer)
      With this option enabled, source files will be deleted after the transfer is complete.
      static void setDisableForceFlush​(boolean dff)
      Calling this method will set the system property that specifies if a transfer should force the file metadata to update on each write (disabled = true) or should wait until the file is complete (disabled = false).
      void setDowngradeModeOnReConnect​(boolean downgradeModeOnReConnect)
      If set to true, if a disconnect occurs during a UDP transfer, upon reconnect and resume, the transfer mode is downgraded to multi-stream TCP, then single stream TCP, and finally HTTP (if available).
      void setExtendedReadTimeout​(int millisecs)
      This is the length of time the client will wait for a reply after sending a long running command (such as MD5, MKDLT, MKSIG, ZIP, UNZIP) to the FileCatalyst server.
      void setFileCache​(CachedFileIndexInterface fileCache)
      Sets the file cache.
      void setFileFilter​(FileCatalystFileFilter filter)
      Sets the FileFilter that is to be used by the implementation.
      void setFileSizeThreshHold​(long fileSizeThreshHold)
      Sets the file size thresh hold.
      void setFileTransferPriority​(int fileTransferPriority)
      Sets the FileTransferPrioriry to new new value.
      void setForceFileOwnershipEnabled​(boolean isForceFileOwnershipEnabled)
      Sets whether or not the force file ownership feature is enabled.
      void setForceFileOwnershipGroup​(java.lang.String forceFileOwnershipGroup)
      Sets the groupname / groupID to be used when attempting to force group level ownership for files downloaded by the client.
      void setForceFileOwnershipUser​(java.lang.String forceFileOwnershipUser)
      Sets the username to be used when attempting to force file ownership for files downloaded by the client
      void setForceTCPmodeACKs​(boolean forceTCPmodeACKs)
      By default, FileCatalyst uses UDP to acknowledge data received.
      void setIncomingDataPort​(int inDataPort)
      Sets the port used for incoming UDP packets on downloads.
      void setIncomingDataPorts​(int[] inDataPorts)
      Sets the port used for incoming UDP packets on downloads.
      void setIncrementalMode​(int incrementalMode)
      When incremental is enabled, this method allows you to choose the incremental mode.
      void setIncrementalSizeCheckOnly​(boolean incrementalSizeCheckOnly)
      Setting this value will cause the MD5 checks to be skipped and the files compared using size only.
      void setLocalWorkingDirectory​(java.nio.file.Path localWorkingDirectory)
      Sets the Local Working directory.
      void setLogger​(unlimited.core.util.common.logs.LogUtils logger)
      overriding the logUtils object.
      void setLogLocation​(java.lang.String logLocation)
      Specifies a directory on the local system where the log file should be stored.
      void setLogPrefix​(java.lang.String logPrefix)
      Sets the prefix for the log file name.
      void setMaintainLastModified​(boolean isMaintainLastModified)
      Sets the maintain last modified feature to the value specified.
      void setMaintainPermissions​(boolean maintainPermissions)
      If set to true, upon each successful transfer, the destination file permissions will be set to match those of the source file.
      void setMaxRetries​(int maxRetries)
      Specify the number of times to retry a broken or interrupted transfer.
      void setMaxWorkQueueuRePush​(int maxPush)
      Sets the max amount of times a failed transfer job will be returned to the work queue after a failure
      void setMd5RateLimit​(int md5RateLimit)
      Sets the rate limit to use when calculating MD5s of files
      void setMode​(int mode)
      Set the transfer mode of this client.
      void setNumBlockReaders​(int numBlockReaders)
      Sets the number of block reader threads.
      void setNumBlockWriters​(int numBlockWriters)
      Sets the number of block writer threads to use when receiving a file.
      void setNumFTPStreams​(int numFTPStreams)
      When transferring in FTP mode, it is possible to send with several concurrent streams.
      void setNumPacketProcessors​(int numPacketProcessors)
      Sets the number of threads used to process incoming UDP packets when downloading.
      void setNumReceiveSockets​(int numReceiveSockets)
      Set the number of UDP sockets to use to receive packets during a UDP download.
      void setNumSenderSockets​(int numSenderSockets)
      Sets the number of UDP sockets to use when uploading a file in UDP mode.
      void setNumSenderThreads​(int numThreads)
      This value determines how many blocks will be sent into the pipe before redundant data will be sent.
      void setNumThreads​(int numThreads)
      This value determines how many blocks will be sent into the pipe before redundant data will be sent.
      void setNumUDPSockets​(int numUDPSockets)
      Sets the number of UDP sockets to use when uploading a file in UDP mode.
      void setObserver​(java.util.Observer observer)
      FCClient is not directly observable, however TransferHook is.
      void setOptimizeBlockSize​(boolean optimizeBlockSize)
      If set to true, FileCatalyst will attempt to optimize the current block size to be an exact multiple of the data size that is being transmitted.
      void setPacketQueueDepth​(int packetQueueDepth)
      Sets the depth of the application level packet queue.
      void setPacketSize​(int packetSize)
      Set the unit size.
      void setPostTaskSentData​(PostTaskSentData data)
      Sets the current post task sent data to the specified value
      void setPostURL​(java.lang.String postURL)
      Sets the current post URL to the value that is defined
      void setProgressiveTimeout​(int progressiveTimeout)
      Sets the current progressive timeout to the value supplied
      void setProgressiveTimeoutFilter​(java.lang.String progressiveTimeoutFilter)
      Sets the current progressive timeout filter to the value that is set to
      void setProgressiveTransfers​(boolean progressiveTransfers)
      With this option enabled, upon completion of an upload or download, FileCatalyst will compare the size of the source file to the size when it began the transfer.
      void setRateDistributer​(RateDistributer rateDistributer)  
      void setReadBufferSizeKB​(int bufferSizeKB)
      Sets the read buffer size used when reading data from disk.
      void setReadTimeout​(int millisecs)
      This is the length of time the client will wait for a reply after sending a command to the FileCatalyst server.
      protected java.lang.String setRealPwd()
      Sets the working directory of the client
      void setRemoteFileFilter​(FileCatalystFileFilter<?> filter)
      Sets the file filter to be used when listing or interacting with remote files on the FCServer.
      void setRemotePort​(int remotePort)
      Sets the remote port to which this client will be connected.
      void setRemoteServer​(java.lang.String remoteServer)
      Set the remote server to which this client should connect.
      void setRenameExtension​(boolean renameExtension)
      Sets whether or not the rename extension should be used
      void setReport​(unlimited.fc.reporting.ClientDataReport reporter)
      Sets the report object.
      void setRollingStartRate​(RollingStartRate rollingStartRate)  
      void setRunningIntegrationTest​(boolean isRunning)
      Internal use only: Sets whether or not this MultiClientManager is running in an integration test
      void setServerAgentID​(java.lang.String serverAgentID)
      Sets the server agent ID to the new value
      void setServletLocation​(java.lang.String servletLocation)
      FileCatalyst has the ability to upload using the HTTP/S protocol as long as the FileCatalyst Servlet application is installed and properly configured.
      void setServletLocation​(java.lang.String servletLocation, java.lang.String servletSessionID, java.lang.String welcomeMessage)
      FileCatalyst has the ability to upload using the HTTP/S protocol as long as the FileCatalyst Servlet application is installed and properly configured.
      void setServletMultiplier​(int servletMultiplier)
      When uploading in HTTP mode using FileCatalyst Servlet, this option allows the upload buffer size to be tuned.
      void setSessionID​(java.lang.String sessionID)
      Sets the session ID to the specified value.
      void setSessionManageMode​(SessionManageMode sessionManageMode)
      Sets the session management mode to the supplied value
      void setShowConsoleLog​(boolean showConsoleLog)
      If set to true, all logging information is also sent to standard out.
      void setSSLSocketProducer​(unlimited.core.util.common.net.ssl.FCSSLSocketProducerImpl producerImpl)
      Sets the implementation that will be used to generate SSL sockets
      void setStartRate​(int incomingSlowStartRate)
      Sets the start rate for FC transfers in Kilobits per second.
      void setStickySessionID​(java.util.function.Supplier<java.lang.String> stickyIDProvider)
      Sets the current supplier that is used to generate the unique sticky session identifier that the FileCatalyst Client use when the connect to the FileCatalyst LoadBalancer
      void setTargetRate​(int targetRate)
      Sets the target rate (kbps) for this client.
      void setTaskID​(java.lang.String taskID)
      Sets the current task ID to the new value supplied
      void setTransactionID​(java.lang.String uniqueID)
      Sets a unique transaction number for the transfer (instance variable).
      void setTransferEmptyDirectories​(boolean transferEmptyDirectories)
      Sets whether or not the implementation should transfer empty directories
      void setTransferHolder​(PostURLTransfer.TransferHolder h)  
      void setTransferToServerOverride​(int serverOverrideBW)
      Sets bandwidth value that the Server is attempting to override this client to.
      void setTransferWithTempName​(boolean transferWithTempName)
      With this option enabled, files will be uploaded with a temporary filename and renamed back to their original name when the transfer is complete.
      void setTransferWithTempName​(boolean transferWithTempName, int tempMode)
      With this option enabled, files will be uploaded with a temporary filename and renamed back to their original name when the transfer is complete.
      void setUnitSize​(int unitSize)
      Use setPacketSize()
      protected TransferJobQueue setUpQueue()
      Sets up the pending work queue when called.
      void setUseCompression​(boolean useCompression)
      Enables/disables on the fly compression.
      void setUseCongestionControl​(boolean useCongestionControl)
      Enables/disables congestion control for this client.
      void setUseIncremental​(boolean useIncremental)
      If set to true, before each source file is transferred, it will be compared with the destination file if it exists to ensure the file has changed.
      void setUserEmailAddress​(java.lang.String newEmailAddress)
      Sets the connected user's email address when called
      void setUserFullName​(java.lang.String newUserName)
      Set's The User's Name When Called
      void setUserRelativePriority​(int priority)
      This priority hint is to help the server distribute bandwidth within its own set parameters.
      void setUseSSL​(boolean useSSL)
      If set to true, control connection will be made using an implicit SSL connection.
      void setVerifyIntegrity​(boolean verifyIntegrity)
      If set to true, after each file is transferred an MD5 sum will be performed on the destination file and the result will be compared to that of the source file to ensure the files are identical.
      void setVerifyMode​(int verifyMode)
      Sets the integrity verification mode
      void setWaitRetry​(long waitRetry)
      Sets the amount of time in milliseconds to wait before the client attempts to retry a failed transfer
      void setWriteBufferSizeKB​(int bufferSizeKB)
      Sets the write buffer size used when saving data to disk.
      void setWriteFileMode​(java.lang.String mode)
      Set JAVA file write mode when saving data to disk.
      void setZipFileSizeLimit​(long zipFileSizeLimit)
      Sets the zip file size limit to the value specified.
      protected void shutdown()
      Shuts down the MultiClient Manager when called
      protected void shutdownInternalTaskScheduler()  
      protected void shutDownWork()
      Shuts down the manager's current work
      boolean siteMatch​(java.lang.String host, int port, ClientCredentials creds)
      Returns whether or not the supplied information matches the information currently set in the Manager.
      long size​(java.lang.String remoteFile)
      Return the size of a remote file
      long size​(java.lang.String remoteFile, boolean bypassCache)
      Get the size of the named file from the remote server.
      void start()
      This will start the MultiClientManager by attempting to initialize, connect, login then spawn the client pool threads.
      protected void startReporting()  
      protected void startUpdatingTargetRate()  
      protected void stopReporting()  
      void stopSpeedTesting()
      Stops the current speed testing methods that this TransferMechanism may be executing
      java.util.stream.Stream<FileListDataItem> streamWithInlineParse()
      Returns streaming meta data for files in the current remote directory.
      java.util.stream.Stream<FileListDataItem> streamWithInlineParse​(java.lang.String directory)
      Returns streaming meta data for files in the given remote directory.
      java.util.stream.Stream<FileListDataItem> streamWithInlineParse​(java.lang.String directory, java.util.function.BooleanSupplier isCancelled)
      Returns streaming meta data for files in the given remote directory.
      java.util.stream.Stream<FileListDataItem> streamWithInlineParse​(java.util.function.BooleanSupplier isCancelled)
      Returns streaming meta data for files in the current remote directory.
      protected boolean synchClient​(FileTransferMechanism client)
      Syncs the supplied FileTransferMechanism's current settings to the settings within the MultiClient.
      int testApproximateDownloadSpeed()
      Performs a quick test to determine the approximate download speed to the connected server.
      int testApproximateUploadSpeed()
      Performs a quick test to determine the approximate upload speed to the connected server.
      int testMaximumDownloadSpeed()
      Performs a series of tests to determine the maximum download speed from the connected server.
      int testMaximumUploadSpeed()
      Performs a series of tests to determine the maximum upload speed to the connected server.
      void testUDPACKs()
      Tests if UDP ACK mode is possible an configures internal variables.
      int testWriteSpeed()
      Perform a write to current directory with recommended values for determining storage rate.
      int testWriteSpeed​(java.nio.file.Path file, int size, int timeout)
      Perform a write to specified file with specified size and timeout for determining storage rate.
      java.lang.String toString()  
      <FileType> void transferJobStream​(java.util.stream.Stream<TransferJob.FileTypeJob<FileType>> stream)  
      TransferHook upload​(java.lang.String localFile)
      Upload the specified file to the current remote working directory.
      TransferHook upload​(java.nio.file.Path localFile)
      Upload the specified file to the current remote working directory.
      TransferHook upload​(java.nio.file.Path localFile, java.lang.String remotePath)
      Upload the specified file to the specified remote directory.
      TransferHook upload​(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.
      TransferHook upload​(java.util.List<java.nio.file.Path> files)
      Uploads all File objects in the Vector provided to the current remote working directory.
      TransferHook upload​(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.
      TransferHook upload​(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.
      TransferHook uploadAs​(java.nio.file.Path localFile, java.lang.String remoteFilename)
      Upload the specified file to the specified remote filename.
      TransferHook uploadAs​(java.nio.file.Path localFile, java.lang.String remoteFilename, java.lang.String transferUniqueID)
      Upload the specified file to the specified remote filename.
      TransferHook uploadList​(java.util.List<java.nio.file.Path> files, java.lang.String remotePath, java.lang.String transferUniqueID)
      Uploads a list of files to the connected Server
      TransferHook uploadList​(java.util.List<java.nio.file.Path> files, java.lang.String remotePath, java.lang.String transferUniqueID, boolean needsRecurse)
      Uploads a list of files to the connected Server.
      void uploadRange​(java.nio.file.Path localFile, java.lang.String remoteFile, long offset, long length)
      Uploads a range of rate for the given file.
      void uploadStream​(java.util.stream.Stream<java.nio.file.Path> stream)
      Uploads the provided stream to the currently connected Server.
      boolean willTransferWork()
      Returns whether or not transfers will work under the current settings
      boolean workInProgress()
      Returns whether or not the MultiClientManager has any work that is currently in progress
      boolean workRemaining()
      Returns whether or not the MultiClientManager has any work remaining within it's queue.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • sessionID

        public java.lang.String sessionID
      • AGGREGATECAP

        public static final java.util.function.Supplier<java.lang.Integer> AGGREGATECAP
      • clientPoolSize

        public final int clientPoolSize
      • clients

        protected com.google.common.collect.HashBiMap<java.lang.Integer,​FileTransferMechanism> clients
      • transitionalClientLock

        protected java.lang.Object transitionalClientLock
      • autoArchivingSpecificCompressionData

        protected CompressionData autoArchivingSpecificCompressionData
      • streamingLock

        protected java.lang.Object streamingLock
    • Constructor Detail

      • MultiClientManager

        public MultiClientManager​(java.lang.String remoteServer,
                                  int poolsize)
        Constructs an un-initialized, un-connected MultiClientManager object. This will also set the default remote port 21. The MultiClientManager object must be initialized prior to use.
        Parameters:
        remoteServer - the remote server
        poolsize - the poolsize
      • MultiClientManager

        public MultiClientManager​(java.lang.String remoteServer,
                                  int port,
                                  int poolsize)
        Constructs an un-initialized, un-connected MultiClientManager object.
        Parameters:
        remoteServer - the remote server
        port - the port
        poolsize - the poolsize
      • MultiClientManager

        protected MultiClientManager​(java.lang.String remoteServer,
                                     ClientFactory fact)
        Constructs an un-initialized, un-connected FCClient object. This will also set the default remote port 21. The FCClient object must be initialized prior to use.
        Parameters:
        remoteServer - The remote server to which to connect.
      • MultiClientManager

        protected MultiClientManager​(java.lang.String remoteServer,
                                     int port,
                                     ClientFactory fact)
        Constructs an un-initialized, un-connected MultiClientManager object. The MultiClientManager object must be initialized prior to use.
        Parameters:
        remoteServer - The remote server to which to connect.
        port - The remote port to which to connect.
    • Method Detail

      • setRollingStartRate

        public void setRollingStartRate​(RollingStartRate rollingStartRate)
      • setRateDistributer

        public void setRateDistributer​(RateDistributer rateDistributer)
      • setAutoConnectClientFactory

        public void setAutoConnectClientFactory​(java.util.function.Supplier<FileTransferMechanism> fact)
      • registerStateSignal

        public void registerStateSignal​(StateSignal signal)
        This state signal being registered will be signaled when the multi client manager enters an instance of that signal type
        Parameters:
        signal - - signal that can be waited on
      • hasSignalRegistered

        public boolean hasSignalRegistered​(StateSignal signal)
        Returns whether or not the state signal has been successfully registered to this MultiClient Manager instance
        Parameters:
        signal - Signal to check for
        Returns:
        True if signal already registered, false if not
      • deRegisterStateSignal

        public void deRegisterStateSignal​(StateSignal signal)
        De-registers the specified state signal and makes it so it is no longer called system when the state is entered
        Parameters:
        signal - - signal to be removed
      • getData

        public TransferMechanismData getData()
        Returns the DataObject that contains all of the transfer settings for this MultiClientManager
        Returns:
      • setUpQueue

        protected TransferJobQueue setUpQueue()
        Sets up the pending work queue when called. Called when the MultiClientManager initializes it's information
        Returns:
        New transfer job queue to be used for the pendingJob queue
      • initThreadSafeHook

        protected void initThreadSafeHook()
        Initializes the ThreadSafeMultiHook that is used to provide transfer information in Thread safe manner
      • setAutoArchivingSpecificCompressionData

        public void setAutoArchivingSpecificCompressionData​(CompressionData autoArchivingSpecificCompressionData)
        Sets the auto archiving specific compression data.
        Parameters:
        autoArchivingSpecificCompressionData - the new auto archiving specific compression data
      • shutdown

        protected void shutdown()
        Shuts down the MultiClient Manager when called
      • shutdownInternalTaskScheduler

        protected void shutdownInternalTaskScheduler()
      • removePropertyChangeListener

        public void removePropertyChangeListener​(java.beans.PropertyChangeListener listener)
        Removes the property change listener.
        Parameters:
        listener - the listener
      • firePropertyChange

        protected void firePropertyChange​(java.beans.PropertyChangeEvent evt)
        Fires a PropertyChange event for all objects listening for them
        Parameters:
        evt -
      • initializeManager

        protected void initializeManager()
        Initializes the Multi-Client Manager for work
      • getCurrentState

        public MultiClientState getCurrentState()
        Gets the current state.
        Returns:
        the current state
      • isCurrentStateConnected

        public boolean isCurrentStateConnected()
        Description copied from interface: FileTransferMechanism
        Returns whether or not the FileTransferMechanism currently has a connection.
        Specified by:
        isCurrentStateConnected in interface FileTransferMechanism
        Returns:
        Whether or not mechanism is connected
      • setCurrentState

        protected void setCurrentState​(MultiClientState newState)
        Sets the manager's current state to the new provided state
        Parameters:
        newState - State to set
      • initialize

        public void initialize​(boolean generateUserLogs)
        Description copied from interface: FileTransferMechanism
        Initialize FCClient 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(boolean generateUserLogs) method is called.
        Specified by:
        initialize in interface FileTransferMechanism
        Parameters:
        generateUserLogs - generate default FCAPI logs in your log location
      • getActiveClientIDs

        public java.util.List<java.lang.Integer> getActiveClientIDs()
        Gets the active client ID's each client in the pool is assigned an ID 0-n where n is the number of clients. This will give a snapshot list of all the active client ID's These ID's are useful when trying to get individual hook information see {@link MultiClientTransferHook.getHook(Integer id)}
        Returns:
        the active client i ds
      • getIdleClientIDs

        public java.util.List<java.lang.Integer> getIdleClientIDs()
        Gets the idle client ID's. each client in the pool is assigned an ID 0-n where n is the number of clients. This will give a snapshot list of all the idle client ID's These ID's are useful when trying to get individual hook information see {@link MultiClientTransferHook.getHook(Integer id)}
        Returns:
        the idle client ID's
      • getIdleClientsCopy

        protected java.util.HashSet<FileTransferMechanism> getIdleClientsCopy()
        Creates and returns a mutable copy of the idle client list
        Returns:
        The Idle Clients
      • connect

        public void connect()
                     throws unlimited.core.util.common.exception.FCException,
                            java.io.IOException
        Description copied from interface: FileTransferMechanism
        Connect to the FileCatalyst server. Once connected, the client can execute commands and transfer files on the Server
        Specified by:
        connect in interface FileTransferMechanism
        Throws:
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • start

        public void start()
                   throws unlimited.core.util.common.exception.FCException,
                          java.io.IOException
        This will start the MultiClientManager by attempting to initialize, connect, login then spawn the client pool threads. This should not be called until all the initialization values are set.
        Throws:
        unlimited.core.util.common.exception.FCException - the fC exception
        java.io.IOException - Signals that an I/O exception has occurred.
      • initReportWriter

        protected void initReportWriter()
        Initializes the report writer it hasn't already been initalized by the system
      • isDowngradeModeOnReConnect

        public boolean isDowngradeModeOnReConnect()
        Description copied from interface: FileTransferData
        Returns true if the downgrade on reconnect option is enabled, false otherwise.
        Specified by:
        isDowngradeModeOnReConnect in interface FileTransferData
        Returns:
        boolean true if the downgrade on reconnect option is enabled, false otherwise.
      • setDowngradeModeOnReConnect

        public void setDowngradeModeOnReConnect​(boolean downgradeModeOnReConnect)
        Description copied from interface: FileTransferData
        If set to true, if a disconnect occurs during a UDP transfer, upon reconnect and resume, the transfer mode is downgraded to multi-stream TCP, then single stream TCP, and finally HTTP (if available).
        Specified by:
        setDowngradeModeOnReConnect in interface FileTransferData
        Parameters:
        downgradeModeOnReConnect - the downgradeModeOnReConnect to set
      • setClientSubIdentifier

        public void setClientSubIdentifier​(int id)
        Description copied from interface: FileTransferData
        Sets an ID that further identifies this client
        Specified by:
        setClientSubIdentifier in interface FileTransferData
        Parameters:
        id - the clientSubIdentifier to set
      • setClientString

        public void setClientString​(java.lang.String clientString)
        Description copied from interface: FileTransferData
        Set a text string that will be displayed on the server UI to identify this client. USeful when developing 3rd party applications that are not identified properly by FileCatalyst internal IDs.
        Specified by:
        setClientString in interface FileTransferData
        Parameters:
        clientString - the clientString to set
      • getObserver

        public java.util.Observer getObserver()
        Description copied from interface: FileTransferData
        Returns the Observer that is currently set.
        Specified by:
        getObserver in interface FileTransferData
        Returns:
        the observer
      • setObserver

        public void setObserver​(java.util.Observer observer)
        Description copied from interface: FileTransferData
        FCClient is not directly observable, however TransferHook is. Setting an Observer using this method ensures that the given Observer will be set on the TransferHook object returned from upload and download method calls prior to the actual transfer being initiated.
        Specified by:
        setObserver in interface FileTransferData
        Parameters:
        observer - the observer to set
      • setCallbackHandler

        public void setCallbackHandler​(FileCatalystClientCallbackHandler callbackHandler)
        Sets a callback handler that will be used to confirm resume, overwrite and to do post processing

        Note when implementing the confirmOverwrite and confirmResume methods, keep in mind not to synchronize on this MultiClientManager or its MultiClientTransferHook as you run the risk of deadlock. Also note, your callback handler will be wrapped as a delegate to a ManagedMultiCallback to keep track of YES_TO_ALL and NO_TO_ALL options across multiple clients.

        Specified by:
        setCallbackHandler in interface FileTransferData
        Parameters:
        callbackHandler - the callbackHandler to set
      • getWriteFileMode

        public java.lang.String getWriteFileMode()
        Description copied from interface: FileTransferData
        Gets the file write mode set Client application will use these values for downloads only. Server has these values defined remotely for uploads.
        Specified by:
        getWriteFileMode in interface FileTransferData
        Returns:
        returns either rw, rws, rwd, or ""
      • setWriteFileMode

        public void setWriteFileMode​(java.lang.String mode)
        Description copied from interface: FileTransferData
        Set JAVA file write mode when saving data to disk. Client application will use these values for downloads only. Server has these values defined remotely for uploads.
        Specified by:
        setWriteFileMode in interface FileTransferData
        Parameters:
        mode - Default "" uses "rws" for Windows/Linux, and "rw" for Solaris/MacOSX. Possible values are "", rw, rws, rwd
      • getWriteBufferSizeKB

        public int getWriteBufferSizeKB()
        Description copied from interface: FileTransferData
        Return the current write buffer size. Value is in KB. Value zero (0) indicates read buffer is dictated by the network block size. Client application will use these values for downloads only. Server has these values defined remotely for uploads.
        Specified by:
        getWriteBufferSizeKB in interface FileTransferData
        Returns:
        the writeBufferSize
      • setWriteBufferSizeKB

        public void setWriteBufferSizeKB​(int bufferSizeKB)
        Description copied from interface: FileTransferData
        Sets the write buffer size used when saving data to disk. Default (0) sets value to network buffer size. Client application will use these values for downloads only. Server has these values defined remotely for uploads.
        Specified by:
        setWriteBufferSizeKB in interface FileTransferData
        Parameters:
        bufferSizeKB - default value will utilize network block size for writes. Value in KB.
      • getReadBufferSizeKB

        public int getReadBufferSizeKB()
        Description copied from interface: FileTransferData
        Return the current read buffer size, in KB Value zero (0) indicates read buffer is dictated by the network block size. Client application will use these values for uploads only. Server has these values defined remotely for downloads.
        Specified by:
        getReadBufferSizeKB in interface FileTransferData
        Returns:
        readBufferSize
      • setReadBufferSizeKB

        public void setReadBufferSizeKB​(int bufferSizeKB)
        Description copied from interface: FileTransferData
        Sets the read buffer size used when reading data from disk. Default (0) sets value to network buffer size. Client application will use these values for uploads only. Server has these values defined remotely for downloads.
        Specified by:
        setReadBufferSizeKB in interface FileTransferData
        Parameters:
        bufferSizeKB - default value will utilize network block size for reads.
      • getNumBlockReaders

        public int getNumBlockReaders()
        Description copied from interface: FileTransferData
        Returns the number of block reader threads. Client application will use these values for uploads only. Server has these values defined remotely for downloads.
        Specified by:
        getNumBlockReaders in interface FileTransferData
        Returns:
        the numBlockReaders
      • setNumBlockReaders

        public void setNumBlockReaders​(int numBlockReaders)
        Description copied from interface: FileTransferData
        Sets the number of block reader threads. Increasing the number of blocker reader threads may increase read speed performance and help boost performance. Client application will use these values for uploads only. Server has these values defined remotely for downloads.
        Specified by:
        setNumBlockReaders in interface FileTransferData
        Parameters:
        numBlockReaders - the numBlockReaders to set
      • getNumBlockWriters

        public int getNumBlockWriters()
        Description copied from interface: FileTransferData
        Returns the number of block writer threads. Client application will use these values for downloads only. Server has these values defined remotely for uploads.
        Specified by:
        getNumBlockWriters in interface FileTransferData
        Returns:
        the numBlockWriters
      • setNumBlockWriters

        public void setNumBlockWriters​(int numBlockWriters)
        Description copied from interface: FileTransferData
        Sets the number of block writer threads to use when receiving a file. Writing to the file with multiple threads may improve performance. Client application will use these values for downloads only. Server has these values defined remotely for uploads.
        Specified by:
        setNumBlockWriters in interface FileTransferData
        Parameters:
        numBlockWriters - the numBlockWriters to set
      • getNumSenderThreads

        public int getNumSenderThreads()
        Description copied from interface: FileTransferData
        Returns the number of threads that will be used at most for each FC transmission.
        Specified by:
        getNumSenderThreads in interface FileTransferData
        Returns:
        the number of threads that will be used at most for each FC transmission.
      • setNumSenderThreads

        public void setNumSenderThreads​(int numThreads)
        Description copied from interface: FileTransferData
        This value determines how many blocks will be sent into the pipe before redundant data will be sent. In high RTT environments, this value multiplied by the block size should be higher than the product of the RTT and the target rate. Depending on the speed and spec of the disk, it may be advantageous to have more threads with a higher block size or vise versa. Number of threads is set to 5 by default.
        Specified by:
        setNumSenderThreads in interface FileTransferData
        Parameters:
        numThreads - Number of block sender threads to start for each transmission.
      • getNumReceiveSockets

        public int getNumReceiveSockets()
        Description copied from interface: FileTransferData
        Returns the current number of receive sockets. Required for > 2gbps transfers. Default for this value is 1.
        Specified by:
        getNumReceiveSockets in interface FileTransferData
        Returns:
        the numReceiveSockets
      • setNumReceiveSockets

        public void setNumReceiveSockets​(int numReceiveSockets)
        Description copied from interface: FileTransferData
        Set the number of UDP sockets to use to receive packets during a UDP download. When individual UDP sockets receive packets there is latency between when packets are received and when they are processed. This means processing packets form a single socket may limit reception because only a single CPU core may be used. Increasing the number of sockets will allow multiple threads to receive data, and process data in parallel, hence taking advantage of more CPU cores. Required for > 2gbps transfers. Default for this value is 1.
        Specified by:
        setNumReceiveSockets in interface FileTransferData
        Parameters:
        numReceiveSockets - the numReceiveSockets to set
      • getNumSenderSockets

        public int getNumSenderSockets()
        Description copied from interface: FileTransferData
        Return the number of Sender sockets to use
        Specified by:
        getNumSenderSockets in interface FileTransferData
        Returns:
        the Number of UDP Sockets currently set
      • setNumSenderSockets

        public void setNumSenderSockets​(int numSenderSockets)
        Description copied from interface: FileTransferData
        Sets the number of UDP sockets to use when uploading a file in UDP mode. Increasing the number of sockets used may boost performance at high speeds (i.e. greater than 500 Mbps)
        Specified by:
        setNumSenderSockets in interface FileTransferData
      • getPacketQueueDepth

        public int getPacketQueueDepth()
        Description copied from interface: FileTransferData
        Return the current packet queue depth. Client application will use these values for downloads only. Server has these values defined remotely for uploads.
        Specified by:
        getPacketQueueDepth in interface FileTransferData
        Returns:
        the packetQueueDepth
      • setPacketQueueDepth

        public void setPacketQueueDepth​(int packetQueueDepth)
        Description copied from interface: FileTransferData
        Sets the depth of the application level packet queue. As packets are received, the are inserted into this queue to await processing. This queue is an extra level of protection against packet loss due to CPU and I/O bottlenecks, and may help performance when using more than 1 packet processor threads, or in virtual environments where CPU and I/O performance is not predictable. Client application will use these values for downloads only. Server has these values defined remotely for uploads.
        Specified by:
        setPacketQueueDepth in interface FileTransferData
        Parameters:
        packetQueueDepth - the packetQueueDepth to set
      • getNumPacketProcessors

        public int getNumPacketProcessors()
        Description copied from interface: FileTransferData
        Return the current number of packet processor threads. Client application will use these values for downloads only. Server has these values defined remotely for uploads.
        Specified by:
        getNumPacketProcessors in interface FileTransferData
        Returns:
        the numPacketProcessors
      • setNumPacketProcessors

        public void setNumPacketProcessors​(int numPacketProcessors)
        Description copied from interface: FileTransferData
        Sets the number of threads used to process incoming UDP packets when downloading. When packets arrive they are inserted into a queue for processing. The packet processor threads process the packets and sort them into the proper data blocks. The number of threads used to process the packets becomes very important when AES encryption is enabled as it distributes the decryption between the CPU cores. Client application will use these values for downloads only. Server has these values defined remotely for uploads.
        Specified by:
        setNumPacketProcessors in interface FileTransferData
        Parameters:
        numPacketProcessors - the numPacketProcessors to set
      • isCongestionControlEnabled

        public boolean isCongestionControlEnabled()
        Description copied from interface: FileTransferData
        Returns true if congestion control is currently enabled.
        Specified by:
        isCongestionControlEnabled in interface FileTransferData
        Returns:
        true if congestion control is currently enabled.
      • getCongestionControlAggression

        public int getCongestionControlAggression()
        Description copied from interface: FileTransferData
        Returns an aggression factor between 1 (passive) and 10 (aggressive) used by the congestion control mechanism to determine how passive or aggressive it should be in the face of network congestion. Default value is 5.
        Specified by:
        getCongestionControlAggression in interface FileTransferData
        Returns:
        int Aggression factor between 1 (passive) and 10 (aggressive)
      • setCongestionControlEnabled

        public void setCongestionControlEnabled​(boolean enabled)
        Description copied from interface: FileTransferData
        Enables/disables congestion control for this client. When enabled, the client will automatically decrease its transmission or reception rate when congestion is detected. Future versions will allow finer grain control over the reaction algorithm. Congestion control is set to true by default.
        Specified by:
        setCongestionControlEnabled in interface FileTransferData
      • getCongCtrlStrategy

        public int getCongCtrlStrategy()
        Description copied from interface: FileTransferData
        Returns the current congestion control strategy.

        The possible options are:

        • RTT based (CongestionControlType.RTT)
        • LOSS based (CongestionControlType.LOSS)
        • Rate based (CongestionControlType.BSS)
        The default congestion control strategy is Packet Loss.
        Specified by:
        getCongCtrlStrategy in interface FileTransferData
        Returns:
        the congCtrlStrategy
      • setCongCtrlStrategy

        public void setCongCtrlStrategy​(int congCtrlStrategy)
        Description copied from interface: FileTransferData
        Sets the congestion control strategy.

        The possible options are:

        • RTT based (CongestionControlType.RTT)
        • LOSS based (CongestionControlType.LOSS)
        • Rate based (CongestionControlType.BSS)
        The default congestion control strategy is Packet Loss.
        Specified by:
        setCongCtrlStrategy in interface FileTransferData
        Parameters:
        congCtrlStrategy - the congCtrlStrategy to set
      • autoDetectConectionModeDownload

        public void autoDetectConectionModeDownload()
        Description copied from interface: FileTransferMechanism
        This 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.
        Specified by:
        autoDetectConectionModeDownload in interface FileTransferMechanism
      • autoDetectConectionModeUpload

        public void autoDetectConectionModeUpload()
        Description copied from interface: FileTransferMechanism
        This 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.
        Specified by:
        autoDetectConectionModeUpload in interface FileTransferMechanism
      • autoDetectConectionModeDownload

        public void autoDetectConectionModeDownload​(boolean testUDP,
                                                    boolean portFallback)
        Description copied from interface: FileTransferMechanism
        This 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.
        Specified by:
        autoDetectConectionModeDownload in interface FileTransferMechanism
        Parameters:
        testUDP - true/false whether or not UDP test should be performed
        portFallback - true/false whether TCP data connection test should fallback to PORT if PASV fails.
      • autoDetectConectionModeUpload

        public void autoDetectConectionModeUpload​(boolean testUDP,
                                                  boolean portFallback)
        Description copied from interface: FileTransferMechanism
        This 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.
        Specified by:
        autoDetectConectionModeUpload in interface FileTransferMechanism
        Parameters:
        testUDP - true/false whether or not UDP test should be performed
        portFallback - true/false whether TCP data connection test should fallback to PORT if PASV fails.
      • autoDetectConectionModeUploadAndDownload

        public void autoDetectConectionModeUploadAndDownload()
        Description copied from interface: FileTransferMechanism
        This 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
        Specified by:
        autoDetectConectionModeUploadAndDownload in interface FileTransferMechanism
      • autoDetectConectionModeUploadAndDownload

        public void autoDetectConectionModeUploadAndDownload​(boolean portFallback)
        Description copied from interface: FileTransferMechanism
        This 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
        Specified by:
        autoDetectConectionModeUploadAndDownload in interface FileTransferMechanism
        Parameters:
        portFallback - true/false whether TCP data connection test should fallback to PORT if PASV fails.
      • login

        public void login​(java.util.function.Supplier<ClientCredentials> creds)
                   throws unlimited.core.util.common.exception.FCException,
                          java.io.IOException
        Description copied from interface: FileTransferMechanism
        Login to the server with the specified credentials.
        Specified by:
        login in interface FileTransferMechanism
        Parameters:
        creds - The ClientCredentials with which to authenticate
        Throws:
        unlimited.core.util.common.exception.FCException - If authentication fails
        java.io.IOException - If a timeout, or other I/O error occurs
      • disconnect

        public void disconnect()
                        throws unlimited.core.util.common.exception.FCException,
                               java.io.IOException
        Description copied from interface: FileTransferMechanism
        Disconnect from the server. TransferMechanism stays initialized and can be reconnected into the Server by calling the connect() method. Method should be used when you want to disconnect the client, but may want to reconnect it back later in your implementations.
        Specified by:
        disconnect in interface FileTransferMechanism
        Specified by:
        disconnect in interface RemoteFileSystemSource
        Throws:
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • doDisconnect

        protected void doDisconnect()
        Method that contains the functionality to disconnect the clients from the system
      • finish

        public void finish()
        Description copied from interface: FileTransferMechanism
        Cleans up memory allocated by the native libraries component of FileCatalyst. This should be called when all transfers are completed, the TransferMechanism has disconnected, and the TransferMechanism is no longer needed.

        Note: Finish() completely disconnects and terminates the FileTransferMechanism in it's entirety. To perform future
        Specified by:
        finish in interface FileTransferMechanism
      • exists

        public boolean exists​(java.lang.String remoteFile)
                       throws unlimited.core.util.common.exception.FCException,
                              java.io.IOException
        Description copied from interface: FileTransferMechanism
        Test if the remote file, denoted by the given remote path, exists on the server and returns true if it exists, false otherwise.
        Specified by:
        exists in interface FileTransferMechanism
        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 occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • size

        public long size​(java.lang.String remoteFile)
                  throws unlimited.core.util.common.exception.FCException,
                         java.io.IOException
        Description copied from interface: FileListDataItemSource
        Return the size of a remote file
        Specified by:
        size in interface FileListDataItemSource
        Parameters:
        remoteFile - String The path to the remote file
        Returns:
        long the size of the remote file or -1 if it doesn't exist
        Throws:
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • size

        public long size​(java.lang.String remoteFile,
                         boolean bypassCache)
                  throws unlimited.core.util.common.exception.FCException,
                         java.io.IOException
        Description copied from interface: FileTransferMechanism
        Get the size of the named file from the remote server.
        Specified by:
        size in interface FileTransferMechanism
        Parameters:
        remoteFile - name of the file
        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

        public TransferHook download​(java.lang.String remoteFile)
                              throws java.io.IOException,
                                     unlimited.core.util.common.exception.FCException
        Description copied from interface: FileTransferMechanism
        Download a the specified file to the current local working directory.
        Specified by:
        download in interface FileTransferMechanism
        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 occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • download

        public TransferHook download​(java.lang.String remoteFile,
                                     java.lang.String localPath)
                              throws unlimited.core.util.common.exception.FCException,
                                     java.io.IOException
        Description copied from interface: FileTransferMechanism
        Download the specified file to the specified local path.
        Specified by:
        download in interface FileTransferMechanism
        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 occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • download

        public TransferHook download​(java.util.List<java.lang.String> files)
                              throws java.io.IOException,
                                     unlimited.core.util.common.exception.FCException
        Description copied from interface: FileTransferMechanism
        Downloads the files as specified by the paths (in String format) contained in the specified vector to the current working directory.
        Specified by:
        download in interface FileTransferMechanism
        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 occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • download

        public TransferHook download​(FileListData files)
                              throws java.io.IOException,
                                     unlimited.core.util.common.exception.FCException
        Description copied from interface: FileTransferMechanism
        Downloads the files specified in the FileListData object to the current local working directory.
        Specified by:
        download in interface FileTransferMechanism
        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 occurs
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
      • download

        public TransferHook download​(FileListData files,
                                     java.lang.String localPath)
                              throws java.io.IOException,
                                     unlimited.core.util.common.exception.FCException
        Description copied from interface: FileTransferMechanism
        Downloads the files specified in the FileListData object to the specified path.
        Specified by:
        download in interface FileTransferMechanism
        Parameters:
        files - FileListData
        localPath - String
        Returns:
        A handler object that can be monitored for progress and status information.
        Throws:
        java.io.IOException - If a timeout, or other IO error occurs
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
      • download

        public TransferHook download​(FileListData files,
                                     java.lang.String localPath,
                                     java.lang.String transferUniqueID)
                              throws java.io.IOException,
                                     unlimited.core.util.common.exception.FCException
        Description copied from interface: FileTransferMechanism
        Downloads the files specified in the FileListData object to the specified path.
        Specified by:
        download in interface FileTransferMechanism
        Parameters:
        files - FileListData
        localPath - String
        transferUniqueID - 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:
        java.io.IOException - If a timeout, or other IO error occurs
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
      • download

        public 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 interface: FileTransferMechanism
        Downloads the files specified in the FileListData object to the specified path.
        Specified by:
        download in interface FileTransferMechanism
        Parameters:
        files - FileListData
        localPath - String
        transferUniqueID - 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 occurs
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
      • download

        public 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 interface: FileTransferMechanism
        Downloads the files as specified by the paths (in String format) contained in the specified vector to the current working directory.
        Specified by:
        download in interface FileTransferMechanism
        Parameters:
        files - A Vector containing paths (as String) of files to be downloaded
        localPath - The local path to which the files 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 occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • download

        public TransferHook download​(java.util.List<java.lang.String> files,
                                     java.lang.String localPath,
                                     java.lang.String transferUniqueID)
                              throws java.io.IOException,
                                     unlimited.core.util.common.exception.FCException
        Description copied from interface: FileTransferMechanism
        Downloads the files as specified by the paths (in String format) contained in the specified vector to the current working directory.
        Specified by:
        download in interface FileTransferMechanism
        Parameters:
        files - A Vector containing paths (as String) of files to be downloaded
        localPath - The local path to which the files will be stored
        transferUniqueID - 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 occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • download

        public 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
        Specified by:
        download in interface FileTransferMechanism
        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.
      • downloadAs

        public TransferHook downloadAs​(java.lang.String remoteFile,
                                       java.lang.String localFile)
                                throws unlimited.core.util.common.exception.FCException,
                                       java.io.IOException
        Description copied from interface: FileTransferMechanism
        Download the specified file to the specified local file.
        Specified by:
        downloadAs in interface FileTransferMechanism
        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 entirely
        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 occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • downloadAs

        public TransferHook downloadAs​(java.lang.String remoteFile,
                                       java.nio.file.Path localFile,
                                       java.lang.String transferUniqueID)
                                throws unlimited.core.util.common.exception.FCException,
                                       java.io.IOException
        Description copied from interface: FileTransferMechanism
        Download the specified file to the specified local file.
        Specified by:
        downloadAs in interface FileTransferMechanism
        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 entirely
        transferUniqueID - 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 occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • downloadAs

        public 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 interface: FileTransferMechanism
        Download the specified file to the specified local file.
        Specified by:
        downloadAs in interface FileTransferMechanism
        Parameters:
        remoteFile - The remote file to be downloaded.
        localFile - The local path to which the file will be stored. Can be a different path entirely
        transferUniqueID - 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 occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • upload

        public TransferHook upload​(java.lang.String localFile)
                            throws java.io.IOException,
                                   unlimited.core.util.common.exception.FCException
        Description copied from interface: FileTransferMechanism
        Upload the specified file to the current remote working directory.
        Specified by:
        upload in interface FileTransferMechanism
        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 occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • upload

        public TransferHook upload​(java.nio.file.Path localFile)
                            throws java.io.IOException,
                                   unlimited.core.util.common.exception.FCException
        Description copied from interface: FileTransferMechanism
        Upload the specified file to the current remote working directory.
        Specified by:
        upload in interface FileTransferMechanism
        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 occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • uploadStream

        public void uploadStream​(java.util.stream.Stream<java.nio.file.Path> stream)
                          throws unlimited.core.util.common.exception.FCException,
                                 java.io.IOException
        Uploads the provided stream to the currently connected Server. Use this method if you expect large collections of files to be transferred
        Parameters:
        stream - Stream of files to be transferred
        Throws:
        unlimited.core.util.common.exception.FCException
        java.io.IOException
      • downloadStream

        public void downloadStream​(java.util.stream.Stream<FileListDataItem> stream)
                            throws unlimited.core.util.common.exception.FCException,
                                   java.io.IOException
        Downloads the provided stream from the currently connected Server. Use this method if you expect large collections of files to be transferred
        Parameters:
        stream -
        Throws:
        unlimited.core.util.common.exception.FCException
        java.io.IOException
      • transferJobStream

        public <FileType> void transferJobStream​(java.util.stream.Stream<TransferJob.FileTypeJob<FileType>> stream)
                                          throws unlimited.core.util.common.exception.FCException,
                                                 java.io.IOException
        Throws:
        unlimited.core.util.common.exception.FCException
        java.io.IOException
      • upload

        public TransferHook upload​(java.nio.file.Path localFile,
                                   java.lang.String remotePath)
                            throws unlimited.core.util.common.exception.FCException,
                                   java.io.IOException
        Description copied from interface: FileTransferMechanism
        Upload the specified file to the specified remote directory.
        Specified by:
        upload in interface FileTransferMechanism
        Parameters:
        localFile - The local file to be uploaded, can be a directory as well
        remotePath - 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 occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • upload

        public 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 interface: FileTransferMechanism
        Upload the specified file to the specified remote directory and specifies a unique transaction id.
        Specified by:
        upload in interface FileTransferMechanism
        Parameters:
        localFile - The local file to be uploaded, can be a directory as well
        remotePath - The remote path where files should be uploaded
        transferUniqueID - 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 occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • uploadAs

        public TransferHook uploadAs​(java.nio.file.Path localFile,
                                     java.lang.String remoteFilename)
                              throws unlimited.core.util.common.exception.FCException,
                                     java.io.IOException
        Description copied from interface: FileTransferMechanism
        Upload 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
        Specified by:
        uploadAs in interface FileTransferMechanism
        Parameters:
        localFile - The local file to be uploaded, can be a directory as well
        remoteFilename - 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 occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • uploadAs

        public 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 interface: FileTransferMechanism
        Upload 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
        Specified by:
        uploadAs in interface FileTransferMechanism
        Parameters:
        localFile - The local file to be uploaded, can be a directory as well
        remoteFilename - The filename to which this file will be stored
        transferUniqueID - 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 occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • upload

        public TransferHook upload​(java.util.List<java.nio.file.Path> files)
                            throws java.io.IOException,
                                   unlimited.core.util.common.exception.FCException
        Description copied from interface: FileTransferMechanism
        Uploads all File objects in the Vector provided to the current remote working directory.
        Specified by:
        upload in interface FileTransferMechanism
        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 occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • upload

        public 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 interface: FileTransferMechanism
        Uploads all File objects in the Vector provided to the specified remote directory.
        Specified by:
        upload in interface FileTransferMechanism
        Parameters:
        files - A Vector of File objects to be uploaded
        remotePath - 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 occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • upload

        public 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 interface: FileTransferMechanism
        Uploads all File objects in the Vector provided to the specified remote directory.
        Specified by:
        upload in interface FileTransferMechanism
        Parameters:
        files - A Vector of File objects to be uploaded
        remotePath - The remote path where files should be uploaded
        transferUniqueID - 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 occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • uploadList

        public TransferHook uploadList​(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 interface: FileTransferMechanism
        Uploads a list of files to the connected Server
        Specified by:
        uploadList in interface FileTransferMechanism
        Parameters:
        files - List of Paths to be uploaded
        remotePath - Remote path of where the files should land on the Server
        transferUniqueID - Unique ID that you wish to have for the transfer
        Returns:
        Throws:
        java.io.IOException
        unlimited.core.util.common.exception.FCException
      • uploadList

        public TransferHook uploadList​(java.util.List<java.nio.file.Path> files,
                                       java.lang.String remotePath,
                                       java.lang.String transferUniqueID,
                                       boolean needsRecurse)
                                throws java.io.IOException,
                                       unlimited.core.util.common.exception.FCException
        Description copied from interface: FileTransferMechanism
        Uploads a list of files to the connected Server.
        Specified by:
        uploadList in interface FileTransferMechanism
        Parameters:
        files - List of Paths to be uploaded
        remotePath - Remote path of where the files should land on the Server
        transferUniqueID - Unique ID that you wish to have for the transfer
        needsRecurse - 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.
      • addCustomLogHandler

        public void addCustomLogHandler​(java.util.logging.Handler handler)
        Description copied from interface: FileTransferMechanism
        Adds a custom log handler to which API logs will be published. This should be called prior to calling initialize() to have an affect.
        Specified by:
        addCustomLogHandler in interface FileTransferMechanism
        Parameters:
        handler - The log handler to add.
      • quote

        public java.lang.String quote​(java.lang.String command)
                               throws java.io.IOException,
                                      unlimited.core.util.common.exception.FCException
        Description copied from interface: FileTransferMechanism
        Issue arbitrary FileCatalyst commands to the FileCatalyst server. example: MD5 commands can be called from here
        Specified by:
        quote in interface FileTransferMechanism
        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 occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • noop

        public void noop()
                  throws java.io.IOException,
                         unlimited.core.util.common.exception.FCException
        Sends a small command to the server to see if it still can be reached.
        Throws:
        java.io.IOException
        unlimited.core.util.common.exception.FCException
      • pwd

        public java.lang.String pwd()
                             throws unlimited.core.util.common.exception.FCException,
                                    java.io.IOException
        Description copied from interface: FileTransferData
        Returns the current remote working directory.
        Specified by:
        pwd in interface FileTransferData
        Specified by:
        pwd in interface RemoteFileSystemSource
        Returns:
        the current remote working directory.
        Throws:
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • cd

        public void cd​(java.lang.String path)
                throws unlimited.core.util.common.exception.FCException,
                       java.io.IOException
        Description copied from interface: FileTransferData
        Sets the current remote working directory to the specified path. This can be relative or absolute.
        Specified by:
        cd in interface FileTransferData
        Specified by:
        cd in interface RemoteFileSystemSource
        Parameters:
        path - The desired remote path to change to.
        Throws:
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs, permission denied, etc...
        java.io.IOException - If a timeout, or other IO error occurs
      • cdup

        public void cdup()
                  throws unlimited.core.util.common.exception.FCException,
                         java.io.IOException
        Description copied from interface: FileTransferMechanism
        Move up one directory on the remote directory structure.
        Specified by:
        cdup in interface FileTransferMechanism
        Specified by:
        cdup in interface RemoteFileSystemSource
        Throws:
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • fsEvents

        public void fsEvents()
                      throws unlimited.core.util.common.exception.FCException,
                             java.io.IOException
        Description copied from interface: FileTransferMechanism
        Prints out a list of the current file system events that are set on the server. Uses a default timeout value of 1000.
        Specified by:
        fsEvents in interface FileTransferMechanism
        Throws:
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • delete

        public void delete​(java.lang.String file)
                    throws unlimited.core.util.common.exception.FCException,
                           java.io.IOException
        Description copied from interface: FileListDataItemSource
        Deletes the specified file from the remote file system.
        Specified by:
        delete in interface FileListDataItemSource
        Parameters:
        file - The file to be deleted
        Throws:
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • deleteAll

        public void deleteAll​(java.util.List files)
                       throws unlimited.core.util.common.exception.FCException,
                              java.io.IOException
        Description copied from interface: FileTransferMechanism
        Delete all specified files in a single efficient command. Files and directories may be passed, and are deleted recursively.
        Specified by:
        deleteAll in interface FileTransferMechanism
        Parameters:
        files - List of files to delete
        Throws:
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • deleteAll

        public void deleteAll​(java.util.List<java.lang.String> files,
                              boolean ftpDelete)
                       throws unlimited.core.util.common.exception.FCException,
                              java.io.IOException
        Description copied from interface: FileTransferMechanism
        Delete all specified files in a single efficient command. Files and directories may be passed, and are deleted recursively.
        Specified by:
        deleteAll in interface FileTransferMechanism
        Parameters:
        files - List of String file names to delete
        ftpDelete - - if true will not delete non empty directories
        Throws:
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • deleteAll

        public void deleteAll​(FileListData files)
                       throws java.io.IOException,
                              unlimited.core.util.common.exception.FCException
        Description copied from interface: FileTransferMechanism
        Delete all specified files in a single efficient command. Files and directories may be passed, and are deleted recursively.
        Specified by:
        deleteAll in interface FileTransferMechanism
        Parameters:
        files - List of files to delete
        Throws:
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • deleteAll

        public void deleteAll​(FileListDataItem[] files)
                       throws java.io.IOException,
                              unlimited.core.util.common.exception.FCException
        Description copied from interface: FileTransferMechanism
        Delete all specified files in a single efficient command. Files and directories may be passed, and are deleted recursively.
        Specified by:
        deleteAll in interface FileTransferMechanism
        Parameters:
        files - List of files to delete
        Throws:
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • mkdir

        public void mkdir​(java.lang.String dir)
                   throws unlimited.core.util.common.exception.FCException,
                          java.io.IOException
        Description copied from interface: FileTransferMechanism
        Creates the specified directory on the remote file system.
        Specified by:
        mkdir in interface FileTransferMechanism
        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 denied
        java.io.IOException - If a timeout, or other IO error occurs
      • rmdir

        public void rmdir​(java.lang.String dir)
                   throws unlimited.core.util.common.exception.FCException,
                          java.io.IOException
        Description copied from interface: FileTransferMechanism
        Deletes the specified directory from the remote file system.
        Specified by:
        rmdir in interface FileTransferMechanism
        Parameters:
        dir - The directory to be deleted
        Throws:
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • rename

        public void rename​(java.lang.String oldName,
                           java.lang.String newName)
                    throws unlimited.core.util.common.exception.FCException,
                           java.io.IOException
        Description copied from interface: FileTransferMechanism
        Renames the specified file to the new name.
        Specified by:
        rename in interface FileTransferMechanism
        Parameters:
        oldName - File to be renamed
        newName - New name for the file
        Throws:
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • list

        public FileListData list()
                          throws unlimited.core.util.common.exception.FCException,
                                 java.io.IOException
        Description copied from interface: FileListDataItemSource
        Returns meta data for files in the current remote directory. Use to see what files exist and can be downloaded from the connected Server
        Specified by:
        list in interface FileListDataItemSource
        Specified by:
        list in interface RemoteFileSystemSource
        Returns:
        meta data for files in the current remote directory.
        Throws:
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • listWithInlineParse

        public FileListData listWithInlineParse()
                                         throws unlimited.core.util.common.exception.FCException,
                                                java.io.IOException
        Description copied from interface: FileTransferMechanism
        Returns meta data for files in the current remote directory.
        Specified by:
        listWithInlineParse in interface FileTransferMechanism
        Returns:
        meta data for files in the current remote directory.
        Throws:
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • listWithInlineParse

        public FileListData listWithInlineParse​(java.lang.String directory)
                                         throws unlimited.core.util.common.exception.FCException,
                                                java.io.IOException
        Description copied from interface: FileTransferMechanism
        Returns meta data for files in the given remote directory.
        Specified by:
        listWithInlineParse in interface FileTransferMechanism
        Specified by:
        listWithInlineParse in interface RemoteFileSystemSource
        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 occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • list

        public FileListData list​(java.lang.String wildcard)
                          throws unlimited.core.util.common.exception.FCException,
                                 java.io.IOException
        Description copied from interface: FileTransferMechanism
        Returns meta data for files in the current remote directory.
        Specified by:
        list in interface FileTransferMechanism
        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 occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • list

        public FileListData list​(java.lang.String wildcard,
                                 java.lang.String remoteDirectory)
                          throws unlimited.core.util.common.exception.FCException,
                                 java.io.IOException
        Description copied from interface: FileTransferMechanism
        Returns meta data for files that match the wildcard in the supplied directory.
        Specified by:
        list in interface FileTransferMechanism
        remoteDirectory - Remote directory to retrieve a listing for
        Returns:
        meta data for files in the current remote directory.
        Throws:
        unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
        java.io.IOException - If a timeout, or other IO error occurs
      • getRemoteServer

        public java.lang.String getRemoteServer()
        Description copied from interface: FileTransferData
        This method returns the remote server / hostname to which this client is connected.
        Specified by:
        getRemoteServer in interface FileTransferData
        Returns:
        the remote server to which this client is connected.
      • setRemoteServer

        public void setRemoteServer​(java.lang.String remoteServer)
        Description copied from interface: FileTransferData
        Set the remote server to which this client should connect. This should be called prior to calling the connect() method.
        Specified by:
        setRemoteServer in interface FileTransferData
        Parameters:
        remoteServer - String value to specify the server to connect to
      • getRemotePort

        public int getRemotePort()
        Description copied from interface: FileTransferData
        Gets the remote port to which this client will be connected.
        Specified by:
        getRemotePort in interface FileTransferData
        Returns:
        the remote port to which this client will be connected.
      • setRemotePort

        public void setRemotePort​(int remotePort)
        Description copied from interface: FileTransferData
        Sets the remote port to which this client will be connected. This should be called prior to calling the connect() method.
        Specified by:
        setRemotePort in interface FileTransferData
        Parameters:
        remotePort - int value to specify the remort post to be used
      • getTargetRate

        public int getTargetRate()
        Description copied from interface: FileTransferData
        Returns the current target rate for this client. The client will attempt to transfer files no faster than the specified rate. If a transfer is already in progress, an attempt will be made to adjust it's target rate to the specified value.
        Specified by:
        getTargetRate in interface FileTransferData
        Returns:
        the current target rate for this client.
      • setTargetRate

        public void setTargetRate​(int targetRate)
        Description copied from interface: FileTransferData
        Sets the target rate (kbps) for this client. The client will attempt to transfer files no faster than the specified rate. If a transfer is already in progress, an attempt will be made to adjust it's target rate to the specified value.
        Specified by:
        setTargetRate in interface FileTransferData
        Parameters:
        targetRate - int value to specify the maximum transfer rate
      • getBlockSize

        public int getBlockSize()
        Description copied from interface: FileTransferData
        Return the current block size. The block size determines how much data each thread will encode and send through the pipe. In higher RTT environments, it might be advantageous to increase this value as it will ensure the pipe is full of data. This however will cause the client side to consume more memory (number of threads * the block size)
        Specified by:
        getBlockSize in interface FileTransferData
        Returns:
        the current block size.
      • setBlockSize

        public void setBlockSize​(int blockSize)
        Description copied from interface: FileTransferData
        Set the block size. The block size determines how much data each thread will encode and send through the pipe. In higher RTT environments, it might be advantageous to increase this value as it will ensure the pipe is full of data. This however will cause the client side to consume more memory (number of threads * the block size) Block size is set to 2048000 by default.
        Specified by:
        setBlockSize in interface FileTransferData
        Parameters:
        blockSize - An int value used to set the Block Size
      • getPacketSize

        public int getPacketSize()
        Description copied from interface: FileTransferData
        Returns the current packet size in bytes. This is the encoded unit size, and determines the eventual UDP packet size. If the unit size is greater than the MTU of the network with will create fragmented UDP packets. This can lead to higher performance in low loss environments, but may decrease performance in environments with very low MTU (ATM) or high packet loss environments.
        Specified by:
        getPacketSize in interface FileTransferData
        Returns:
        The current packet size. In Bytes.
      • setPacketSize

        public void setPacketSize​(int packetSize)
        Description copied from interface: FileTransferData
        Set the unit size. This is the encoded unit size, and determines the eventual UDP packet size. If the unit size is greater than the MTU of the network with will create fragmented UDP packets. This can lead to higher performance in low loss environments, but may decrease performance in environments with very low MTU (ATM) or high packet loss environments. Unit size is set to 1024 Bytes by default.
        Specified by:
        setPacketSize in interface FileTransferData
        Parameters:
        packetSize - int value used to set the Unit Size
      • setTransactionID

        public void setTransactionID​(java.lang.String uniqueID)
        Description copied from interface: FileTransferData
        Sets a unique transaction number for the transfer (instance variable). Transaction number will be used as part of working/temporary filenames when transferring a file.

        Applies to temporary file name, zip file name, signature/delta filename.

        By default, a random unique ID is created per machine by the API. This ensures that on the server, two separate client connections into the same user account should not encounter a filename collision. However, if two concurrent transfers are being launched using the same fileset (ie: upload using auto-zip) from the client API to separate servers, this value must be set for each transfer in order to ensure that temporary & working file name is not reused for two distinct transfers.

        Value may be overridden if you explicitly specify a transaction ID during upload(Vector, String, String) or download(Vector, String, String) calls.

        Specified by:
        setTransactionID in interface FileTransferData
        Parameters:
        uniqueID - String value, should be alpha-numeric (Long.toString(System.currentTimeMillis()))
      • isAutoResume

        public boolean isAutoResume()
        Description copied from interface: FileTransferData
        Returns true if auto-resume is enabled. When enabled, if the destination file is smaller than the source file, the client will compare the relevant portions of the files to see if a transfer can be resumed. This is done using an MD5 checksum.
        Specified by:
        isAutoResume in interface FileTransferData
        Returns:
        true if auto-resume is enabled. false otherwise.
      • setAutoResume

        public void setAutoResume​(boolean autoResume)
        Description copied from interface: FileTransferData
        Enables/disables auto resume feature. When enabled, if the destination file is smaller than the source file, the client will compare the relevant portions of the files to see if a transfer can be resumed. This is done using an MD5 checksum. Auto resume is false by default.
        Specified by:
        setAutoResume in interface FileTransferData
        Parameters:
        autoResume - true/false to enabled or disable this feature.
      • isVerifyIntegrity

        public boolean isVerifyIntegrity()
        Description copied from interface: FileTransferData
        Returns true if integrity check is enabled. If true, after each file is transferred an MD5 sum will be performed on the destination file and the result will be compared to that of the source file to ensure the files are identical.
        Specified by:
        isVerifyIntegrity in interface FileTransferData
        Returns:
        true if integrity check is enabled.
      • setVerifyIntegrity

        public void setVerifyIntegrity​(boolean verifyIntegrity)
        Description copied from interface: FileTransferData
        If set to true, after each file is transferred an MD5 sum will be performed on the destination file and the result will be compared to that of the source file to ensure the files are identical. Verify integrity is false by default.
        Specified by:
        setVerifyIntegrity in interface FileTransferData
        Parameters:
        verifyIntegrity - true/false to enable or disable this feature.
      • isMaintainPermissions

        public boolean isMaintainPermissions()
        Description copied from interface: FileTransferData
        Returns true if maintain permissions is enabled. If value returns true, upon each successful transfer, the destination file permissions will be set to match those of the source file. This features only functions when both the source and destination are running a Linux/Unix based OS.
        Specified by:
        isMaintainPermissions in interface FileTransferData
        Returns:
        true if Maintain permissions is enabled
      • setMaintainPermissions

        public void setMaintainPermissions​(boolean maintainPermissions)
        Description copied from interface: FileTransferData
        If set to true, upon each successful transfer, the destination file permissions will be set to match those of the source file. This features only functions when both the source and destination are running a Linux/Unix based OS. This feature is off by default.
        Specified by:
        setMaintainPermissions in interface FileTransferData
        Parameters:
        maintainPermissions - true/false to enabled and disable this feature.
      • isMaintainLastModified

        public boolean isMaintainLastModified()
        Description copied from interface: FileTransferData
        Returns true if Maintain last modified is enabled. If set to true, upon each successful transfer, the destination files modification date will be set to match that of the source file.
        Specified by:
        isMaintainLastModified in interface FileTransferData
        Returns:
        true if Maintain last modified is enabled
      • setMaintainLastModified

        public void setMaintainLastModified​(boolean isMaintainLastModified)
        Description copied from interface: FileTransferData
        Sets the maintain last modified feature to the value specified. If set to true, upon each successful transfer, the destination files modification date will be set to match that of the source file. This feature is off by default.
        Specified by:
        setMaintainLastModified in interface FileTransferData
        Parameters:
        isMaintainLastModified - true/false to enabled and disable this feature.
      • isUseIncremental

        public boolean isUseIncremental()
        Description copied from interface: FileTransferData
        Returns true if incremental feature is enabled
        Specified by:
        isUseIncremental in interface FileTransferData
        Returns:
        true if incremental feature is enabled
      • setUseIncremental

        public void setUseIncremental​(boolean useIncremental)
        Description copied from interface: FileTransferData
        If set to true, before each source file is transferred, it will be compared with the destination file if it exists to ensure the file has changed. If the file has not changed, the file will not be transmitted. This feature is off by default.
        Specified by:
        setUseIncremental in interface FileTransferData
        Parameters:
        useIncremental - boolean value to turn incremental on/off
      • isOptimizeBlockSize

        public boolean isOptimizeBlockSize()
        Description copied from interface: FileTransferData
        Returns true if optimize block size feature is enabled.
        Specified by:
        isOptimizeBlockSize in interface FileTransferData
        Returns:
        true/false if this feature is enabled/disabled
      • setOptimizeBlockSize

        public void setOptimizeBlockSize​(boolean optimizeBlockSize)
        Description copied from interface: FileTransferData
        If set to true, FileCatalyst will attempt to optimize the current block size to be an exact multiple of the data size that is being transmitted. This feature is on by default.
        Specified by:
        setOptimizeBlockSize in interface FileTransferData
        Parameters:
        optimizeBlockSize - true/false to enabled and disable this feature.
      • getClientCredentials

        public java.util.function.Supplier<ClientCredentials> getClientCredentials()
        Description copied from interface: FileTransferData
        Returns the credentials supplier that is set for this client.
        Specified by:
        getClientCredentials in interface FileTransferData
        Returns:
        the credentials supplier that is set for this client.
      • setClientCredentials

        public void setClientCredentials​(java.util.function.Supplier<ClientCredentials> creds)
        Description copied from interface: FileTransferData
        Sets the credentials supplier for this connection. Value is used to determine which user this transfer mechanism attempts to connect to a FC Server
        Specified by:
        setClientCredentials in interface FileTransferData
      • isUseSSL

        public boolean isUseSSL()
        Description copied from interface: FileTransferData
        Returns true if SSL mode is enabled, false otherwise.
        Specified by:
        isUseSSL in interface FileTransferData
        Returns:
        true if SSL mode is enabled, false otherwise.
      • setUseSSL

        public void setUseSSL​(boolean useSSL)
        Description copied from interface: FileTransferData
        If set to true, control connection will be made using an implicit SSL connection. This must be set prior to calling the connect method.
        Specified by:
        setUseSSL in interface FileTransferData
        Parameters:
        useSSL - Boolean value to turn SSL on/off
      • getSSLSocketProducer

        public unlimited.core.util.common.net.ssl.FCSSLSocketProducerImpl getSSLSocketProducer()
        Description copied from interface: FileTransferData
        Retrieves the implementation that will be used to generate SSL sockets
        Specified by:
        getSSLSocketProducer in interface FileTransferData
      • setSSLSocketProducer

        public void setSSLSocketProducer​(unlimited.core.util.common.net.ssl.FCSSLSocketProducerImpl producerImpl)
        Description copied from interface: FileTransferData
        Sets the implementation that will be used to generate SSL sockets
        Specified by:
        setSSLSocketProducer in interface FileTransferData
        Parameters:
        producerImpl - Concrete instance that provides logic for generating SSL sockets
      • getLogLocation

        public java.lang.String getLogLocation()
        Description copied from interface: FileTransferData
        Returns the current location for the log files.
        Specified by:
        getLogLocation in interface FileTransferData
        Returns:
        The current location for the log files.
      • setLogLocation

        public void setLogLocation​(java.lang.String logLocation)
        Description copied from interface: FileTransferData
        Specifies a directory on the local system where the log file should be stored. If this value is not set, the log will be stored in the current working directory. This should be called prior to calling initialize() to have an affect.
        Specified by:
        setLogLocation in interface FileTransferData
        Parameters:
        logLocation - String value specifying where to store the logs
      • setLogPrefix

        public void setLogPrefix​(java.lang.String logPrefix)
        Sets the prefix for the log file name.
        Specified by:
        setLogPrefix in interface FileTransferMechanism
        Parameters:
        logPrefix - the logPrefix to set
      • getLogger

        public unlimited.core.util.common.logs.LogUtils getLogger()
        Description copied from interface: FileTransferData
        Returns the logger that is used
        Specified by:
        getLogger in interface FileTransferData
        Returns:
        the logger
      • setLogger

        public void setLogger​(unlimited.core.util.common.logs.LogUtils logger)
        Description copied from interface: FileTransferData
        overriding the logUtils object.
        Specified by:
        setLogger in interface FileTransferData
        Parameters:
        logger - the logger to set
      • getStartRate

        public int getStartRate()
        Description copied from interface: FileListDataItemSource
        Returns the current start rate for FC transfers. All FC transfer will begin at this rate and ramp up to the specified target rate if no congestion is encounters.

        Note: Congestion control must be enabled for this value to have an effect.

        Specified by:
        getStartRate in interface FileListDataItemSource
        Returns:
        The current start rate for FC transfers in Kilobits per second
      • setStartRate

        public void setStartRate​(int incomingSlowStartRate)
        Description copied from interface: FileTransferData
        Sets the start rate for FC transfers in Kilobits per second. All FC transfer will begin at this rate and ramp up to the specified target rate if no congestion is encounters. Congestion control must be enabled for this value to have an effect. Start rate is set to 1000 Kbps by default.
        Specified by:
        setStartRate in interface FileTransferData
        Parameters:
        incomingSlowStartRate - int value used to set the rate in which the transfer should start at
      • getConnectTimeout

        public int getConnectTimeout()
        Description copied from interface: FileTransferData
        Return the connect timeout value (in milliseconds)
        Specified by:
        getConnectTimeout in interface FileTransferData
        Returns:
        The connect timeout value (in milliseconds)
      • setConnectTimeout

        public void setConnectTimeout​(int millisec)
        Description copied from interface: FileTransferData
        Sets the connect timeout value (in milliseconds). Default is 20000 milliseconds.
        Specified by:
        setConnectTimeout in interface FileTransferData
        Parameters:
        millisec - int value used to set the connect timeout
      • isShowConsoleLog

        public boolean isShowConsoleLog()
        Description copied from interface: FileTransferData
        Returns true if console log is enabled.
        Specified by:
        isShowConsoleLog in interface FileTransferData
        Returns:
        true if console log is enabled.
      • setShowConsoleLog

        public void setShowConsoleLog​(boolean showConsoleLog)
        Description copied from interface: FileTransferData
        If set to true, all logging information is also sent to standard out. This must be enabled prior to calling the initialize method.
        Specified by:
        setShowConsoleLog in interface FileTransferData
        Parameters:
        showConsoleLog - boolean value set to show the console Log or not
      • isDebug

        public boolean isDebug()
        Description copied from interface: FileTransferData
        Returns true if debug is set to true.
        Specified by:
        isDebug in interface FileTransferData
        Returns:
        True if debug is set to true
      • setDebug

        public void setDebug​(boolean debug)
        Description copied from interface: FileTransferData
        Turns on debug mode.
        Specified by:
        setDebug in interface FileTransferData
        Parameters:
        debug - boolean value to turn the debug mode on or of
      • getNumFTPStreams

        public int getNumFTPStreams()
        Description copied from interface: FileTransferData
        Returns the number of concurrent streams that will be used for FTP transfers
        Specified by:
        getNumFTPStreams in interface FileTransferData
        Returns:
        Number of concurrent streams that will be used for FTP transfers
      • getCompMethod

        public int getCompMethod()
        Description copied from interface: FileTransferData
        Returns the current compression method to be used during transfers. The method dictates what type of algorithm to use when compressing the data into smaller amounts.

        The available compression strategies that can be used are as follows:

        • 0: Default Zip deflator (Lower CPU and memory usage with less efficient compression)
        • 1: LMZA (Higher CPU and memory usage with more efficient data compression)
          Specified by:
          getCompMethod in interface FileTransferData
          Returns:
          int The current compression Method.
        • getCompLevel

          public int getCompLevel()
          Description copied from interface: FileTransferData
          Returns the current compression level (0 - 9). This compression level is used determine the amount of compression to be used when attempting to compress the data in a given transfer. In some networks (such as high bandwidth connections), it may be helpful to lower the amount of compression to a smaller number. In other networks (low bandwidth, satellite networks), it may be helpful t maximize the compression (comp level = 9).
          Specified by:
          getCompLevel in interface FileTransferData
          Returns:
          int The current compression level
        • getCompStrategy

          public int getCompStrategy()
          Description copied from interface: FileTransferData
          Returns the current compression deflater strategy that will be used in the current compression method to minimize the data and compress into smaller byte values.

          Valid return values are:

          • java.util.zip.Deflater.DEFAULT_STRATEGY
          • java.util.zip.Deflater.FILTERED (Strategy that is most beneficial when compressing filtered, sorted data)
          • java.util.zip.Deflater.HUFFMAN_ONLY (Strategy that compresses and decompresses data by encoding and decoding data into different information)
          Specified by:
          getCompStrategy in interface FileTransferData
          Returns:
          int The current compression strategy
        • isCompressionEnabled

          public boolean isCompressionEnabled()
          Description copied from interface: FileTransferData
          Returns true if compression is enabled, false otherwise.
          Specified by:
          isCompressionEnabled in interface FileTransferData
          Returns:
          boolean True if compression is enabled, false otherwise.
        • getIncrementalMode

          public int getIncrementalMode()
          Description copied from interface: FileTransferData
          Returns the current incremental mode.
          Specified by:
          getIncrementalMode in interface FileTransferData
          Returns:
          int The current incremental mode.
        • isAutoZip

          public boolean isAutoZip()
          Description copied from interface: FileTransferData
          Returns true if auto zip is enabled, false otherwise.
          Specified by:
          isAutoZip in interface FileTransferData
          Returns:
          boolean True if auto zip is enabled, false otherwise.
        • isAutoUnzip

          public boolean isAutoUnzip()
          Description copied from interface: FileTransferData
          Returns true if auto unzip is enabled, false otherwise.
          Specified by:
          isAutoUnzip in interface FileTransferData
          Returns:
          boolean True if auto zip is enabled, false otherwise.
        • isTransferWithTempName

          public boolean isTransferWithTempName()
          Description copied from interface: FileTransferData
          Returns true if transferring with temporary names is enabled
          Specified by:
          isTransferWithTempName in interface FileTransferData
          Returns:
          boolean True if transferring with temporary names is enabled
        • getReadTimeout

          public int getReadTimeout()
          Description copied from interface: FileTransferData
          This is the length of time in milliseconds the client will wait for a reply after sending a command to the FileCatalyst server.
          Specified by:
          getReadTimeout in interface FileTransferData
          Returns:
          int The current read timeout value, in millisecods..
        • getExtendedReadTimeout

          public int getExtendedReadTimeout()
          Description copied from interface: FileTransferData
          This is the length of time in milliseconds the client will wait for a reply after sending a long running command (such as MD5, MKDLT, MKSIG, ZIP, UNZIP) to the FileCatalyst server.
          Specified by:
          getExtendedReadTimeout in interface FileTransferData
          Returns:
          int The current extended read timeout value, in millisecods.
        • getServletLocation

          public java.lang.String getServletLocation()
          Description copied from interface: FileTransferData
          FileCatalyst has the ability to upload using the HTTP/S protocol as long as the FileCatalyst Servlet application is installed and properly configured. This method allows you to retrieve the current URL of the FileCatalyst Servlet if it has been set.
          Specified by:
          getServletLocation in interface FileTransferData
          Returns:
          String the URL of FileCatalyst Servlet, or null if it has not been set.
        • isDeleteAfterTransfer

          public boolean isDeleteAfterTransfer()
          Description copied from interface: FileTransferData
          Returns true if the delete after transfer option is enabled, false otherwise. With this option enabled, source files will be deleted after the transfer is complete. If the transfer is an upload, the local files will be deleted. If the transfer is a download, the remote files will be deleted.
          Specified by:
          isDeleteAfterTransfer in interface FileTransferData
          Returns:
          boolean true if the delete after transfer option is enabled, false otherwise.
        • isProgressiveTransfers

          public boolean isProgressiveTransfers()
          Description copied from interface: FileTransferData
          Return true if the progressive option is enabled, false otherwise.
          Specified by:
          isProgressiveTransfers in interface FileTransferData
          Returns:
          boolean true if the progressive option is enabled, false otherwise.
        • getProgressiveTimeout

          public int getProgressiveTimeout()
          Description copied from interface: FileTransferData
          Returns the current progressive timeout value. The value determines how many seconds we will wait for files to stop growing
          Specified by:
          getProgressiveTimeout in interface FileTransferData
          Returns:
        • getProgressiveTimeoutFilter

          public java.lang.String getProgressiveTimeoutFilter()
          Description copied from interface: FileTransferData
          Returns the current progressive timeout filter. Value determines the file that will be included in progressive file growth checks
          Specified by:
          getProgressiveTimeoutFilter in interface FileTransferData
          Returns:
        • getIncomingDataPort

          public int getIncomingDataPort()
          Description copied from interface: FileTransferData
          Returns the port used for incoming UDP packets on downloads Only the first port will be returned in the case of v3.0 where multi-receive sockets have been enabled.
          Specified by:
          getIncomingDataPort in interface FileTransferData
          Returns:
          int The port used for incoming UDP packets on downloads (Only the first port will be returned in the case of v3.0 where multi-receive sockets have been enabled.)
        • getIncomingDataPorts

          public int[] getIncomingDataPorts()
          Description copied from interface: FileTransferData
          Returns the list of ports used for incoming UDP packets on downloads
          Specified by:
          getIncomingDataPorts in interface FileTransferData
          Returns:
          int The list of port used for incoming UDP packets on downloads
        • getServletMultiplier

          public int getServletMultiplier()
          Description copied from interface: FileTransferData
          When uploading in HTTP mode using FileCatalyst Servlet, this option allows the upload buffer size to be tuned. This method returns the current value.
          Specified by:
          getServletMultiplier in interface FileTransferData
          Returns:
          int multiplier value used to tune upload buffer
        • getClientConnectKey

          public java.lang.String getClientConnectKey()
          Description copied from interface: FileTransferData
          Returns the client connect key, used to connect to non-FileCatalyst servers
          Specified by:
          getClientConnectKey in interface FileTransferData
          Returns:
          String Client Connect Key
        • setNumFTPStreams

          public void setNumFTPStreams​(int numFTPStreams)
          Description copied from interface: FileTransferData
          When transferring in FTP mode, it is possible to send with several concurrent streams. This may increase performance on connections with low packet loss, but high latency. Speed gains are linear, that is, if you get 2 Mbps with 1 stream, you should get 4 Mbps with 2 streams.
          Specified by:
          setNumFTPStreams in interface FileTransferData
          Parameters:
          numFTPStreams - Number of concurrent streams to use.
        • setCompStrategy

          public void setCompStrategy​(int compStrategy)
                               throws java.lang.Exception
          Description copied from interface: FileTransferData
          Sets the compression deflater strategy that will be used within the compression method to minimize the data and compress into smaller byte values.

          Valid values are:

          • java.util.zip.Deflater.DEFAULT_STRATEGY
          • java.util.zip.Deflater.FILTERED (Strategy that is most beneficial when compressing filtered, sorted data)
          • java.util.zip.Deflater.HUFFMAN_ONLY (Strategy that compresses and decompresses data by encoding and decoding data into different information)
          Specified by:
          setCompStrategy in interface FileTransferData
          Parameters:
          compStrategy - int The new compression strategy
          Throws:
          java.lang.Exception
        • setCompMethod

          public void setCompMethod​(int compMethod)
                             throws java.lang.Exception
          Description copied from interface: FileTransferData
          Sets the current compression method to be used during transfers. The method dictates what type of algorithm to use alongside the deflater when compressing the data into smaller amounts.

          The available compression strategies that can be used are as follows:

          • 0: Default Zip deflator (Lower CPU and memory usage for less efficient compression)
          • 1: LMZA (Higher CPU and Memory usage for more efficient data compression)
            Specified by:
            setCompMethod in interface FileTransferData
            Parameters:
            compMethod - int The desired compression Method
            Throws:
            java.lang.Exception
          • setCompLevel

            public void setCompLevel​(int compLevel)
                              throws java.lang.Exception
            Description copied from interface: FileTransferData
            Sets the compression level (0 - 9 with default of 4). This compression level is used determine the amount of compression to be used when attempting to compress the data in a given transfer. In some networks (such as high bandwidth connections), it may be helpful to lower the amount of compression to a smaller number. In other networks (low bandwidth, satellite networks), it may be helpful to maximize the compression (comp level = 9).
            Specified by:
            setCompLevel in interface FileTransferData
            Parameters:
            compLevel - int The desired compression level
            Throws:
            java.lang.Exception
          • setCompressionEnabled

            public void setCompressionEnabled​(boolean enable)
            Description copied from interface: FileTransferData
            Enables/disables on the fly compression. When enabled, each block of data will be compressed on the fly before it is sent over the network.
            Specified by:
            setCompressionEnabled in interface FileTransferData
          • setIncrementalSizeCheckOnly

            public void setIncrementalSizeCheckOnly​(boolean incrementalSizeCheckOnly)
            Description copied from interface: FileTransferData
            Setting this value will cause the MD5 checks to be skipped and the files compared using size only.
            Specified by:
            setIncrementalSizeCheckOnly in interface FileTransferData
          • setAutoZip

            public void setAutoZip​(boolean autoZip)
            Description copied from interface: FileTransferData
            Enables/disables auto zip feature. If this feature is enabled, prior to transferring, all files will be compressed into a single archive, transferred as one archive, and decompressed at the destination. Path structure will be maintained, as will file modification times. When using this feature in combination with setProgressive(true), FileCatalyst will beging to transfer the zip file before it is completely generated. This currently only works during uploads.
            Specified by:
            setAutoZip in interface FileTransferData
            Parameters:
            autoZip - boolean
          • setAutoUnzip

            public void setAutoUnzip​(boolean autoUnzip)
            Description copied from interface: FileTransferData
            Enables/disables auto unzip feature. When using this feature in combination with setAutoZip(true), if this feature is enabled, all files will be decompressed at the destination, otherwise if this feature is disable, all files won't be extracted and not deleted either.
            Specified by:
            setAutoUnzip in interface FileTransferData
            Parameters:
            autoUnzip - boolean
          • setTransferWithTempName

            public void setTransferWithTempName​(boolean transferWithTempName)
            Description copied from interface: FileTransferData
            With this option enabled, files will be uploaded with a temporary filename and renamed back to their original name when the transfer is complete. This allows other applications to identify files that are not complete.
            Specified by:
            setTransferWithTempName in interface FileTransferData
            Parameters:
            transferWithTempName - boolean true/false to enable or disable this feature
          • setReadTimeout

            public void setReadTimeout​(int millisecs)
            Description copied from interface: FileTransferData
            This is the length of time the client will wait for a reply after sending a command to the FileCatalyst server.
            Specified by:
            setReadTimeout in interface FileTransferData
            Parameters:
            millisecs - int New timeout value (in millisecs)
          • setExtendedReadTimeout

            public void setExtendedReadTimeout​(int millisecs)
            Description copied from interface: FileTransferData
            This is the length of time the client will wait for a reply after sending a long running command (such as MD5, MKDLT, MKSIG, ZIP, UNZIP) to the FileCatalyst server. Minimum value is 600000 (10 minutes). Any attempt to set a value lower than this will automatically be increased to 600000.
            Specified by:
            setExtendedReadTimeout in interface FileTransferData
            Parameters:
            millisecs - int New timeout value (in millisecs).
          • setVerifyMode

            public void setVerifyMode​(int verifyMode)
            Description copied from interface: FileTransferData
            Sets the integrity verification mode
            Specified by:
            setVerifyMode in interface FileTransferData
            Parameters:
            verifyMode - int Sets the desired mode, TransferMode.VERIFY_AFTER or TransferMode.VERIFY_ON_THE_FLY.
            See Also:
            TransferMode
          • setServletLocation

            public void setServletLocation​(java.lang.String servletLocation)
            Description copied from interface: FileTransferData
            FileCatalyst has the ability to upload using the HTTP/S protocol as long as the FileCatalyst Servlet application is installed and properly configured. This method allows you to set the URL of the FileCatalyst Servlet. Note that you must set the servlet location prior to calling connect(). You must also set the transfer mode to HTTP.
            Specified by:
            setServletLocation in interface FileTransferData
            Parameters:
            servletLocation - String The URL of the FileCatalyst Servlet
          • setServletLocation

            public void setServletLocation​(java.lang.String servletLocation,
                                           java.lang.String servletSessionID,
                                           java.lang.String welcomeMessage)
            Description copied from interface: FileTransferData
            FileCatalyst has the ability to upload using the HTTP/S protocol as long as the FileCatalyst Servlet application is installed and properly configured. This method allows you to set the URL of the FileCatalyst Servlet. Note that you must set the servlet location prior to calling connect(). You must also set the transfer mode to HTTP.
            Specified by:
            setServletLocation in interface FileTransferData
            Parameters:
            servletLocation - String The URL of the FileCatalyst Servlet
            servletSessionID - If s session was already established that should be re-used, this session id should be set
            welcomeMessage - When connecting with pre-connected Servlet session, you may pass the welcome message to the FCClient as well so it can detect whether this is a FileCatalyst server or not as well as extract the version string.
          • setLocalWorkingDirectory

            public void setLocalWorkingDirectory​(java.nio.file.Path localWorkingDirectory)
            Description copied from interface: FileTransferData
            Sets the Local Working directory. This directory is used as a base path during uploads or downloads. For example, if you specify an upload of the folder "/path1/path2" and you have set the working directory to "/path1" then the file will appear on the destination server as "/path2". If you had a local working directory of "/" then the entire path would be created on the destination server. Note: Call will attempt to create the directory if it doesn't currently exist
            Specified by:
            setLocalWorkingDirectory in interface FileTransferData
          • setDeleteAfterTransfer

            public void setDeleteAfterTransfer​(boolean deleteAfterTransfer)
            Description copied from interface: FileTransferData
            With this option enabled, source files will be deleted after the transfer is complete. If the transfer is an upload, the local files will be deleted. If the transfer is a download, the remote files will be deleted.
            Specified by:
            setDeleteAfterTransfer in interface FileTransferData
            Parameters:
            deleteAfterTransfer - boolean Enables/disables the delete after transfer option
          • setProgressiveTransfers

            public void setProgressiveTransfers​(boolean progressiveTransfers)
            Description copied from interface: FileTransferData
            With this option enabled, upon completion of an upload or download, FileCatalyst will compare the size of the source file to the size when it began the transfer. If the file has grown, it will continue to transfer the new data until the file is no longer growing. In this way, it is able to download or upload files that are curently being copied, or are currently being encoded.
            Specified by:
            setProgressiveTransfers in interface FileTransferData
            Parameters:
            progressiveTransfers - boolean boolean Enables/disables the progressive transfer option
          • setProgressiveTimeout

            public void setProgressiveTimeout​(int progressiveTimeout)
            Description copied from interface: FileTransferData
            Sets the current progressive timeout to the value supplied
            Specified by:
            setProgressiveTimeout in interface FileTransferData
            Parameters:
            progressiveTimeout - New timeout to set
          • setProgressiveTimeoutFilter

            public void setProgressiveTimeoutFilter​(java.lang.String progressiveTimeoutFilter)
            Description copied from interface: FileTransferData
            Sets the current progressive timeout filter to the value that is set to
            Specified by:
            setProgressiveTimeoutFilter in interface FileTransferData
            Parameters:
            progressiveTimeoutFilter - Filter to set
          • setIncomingDataPort

            public void setIncomingDataPort​(int inDataPort)
            Description copied from interface: FileTransferData
            Sets the port used for incoming UDP packets on downloads. If not set the default port is 9000.
            Specified by:
            setIncomingDataPort in interface FileTransferData
          • setIncomingDataPorts

            public void setIncomingDataPorts​(int[] inDataPorts)
            Description copied from interface: FileTransferData
            Sets the port used for incoming UDP packets on downloads. Allows for multiple data ports to be selected to have more than one receiver socket open for incoming streams.
            Specified by:
            setIncomingDataPorts in interface FileTransferData
          • setServletMultiplier

            public void setServletMultiplier​(int servletMultiplier)
            Description copied from interface: FileTransferData
            When uploading in HTTP mode using FileCatalyst Servlet, this option allows the upload buffer size to be tuned.
            Specified by:
            setServletMultiplier in interface FileTransferData
            Parameters:
            servletMultiplier - int multiplier value used to tune upload buffer
          • setClientConnectKey

            public void setClientConnectKey​(java.lang.String clientConnectKey)
            Description copied from interface: FileTransferData
            This key must be set in order to connect to non-FileCatalyst servers. This method must be called prior to called connect() or the key will not have any effect.
            Specified by:
            setClientConnectKey in interface FileTransferData
            Parameters:
            clientConnectKey - String Client connect key
          • setClientIdentifier

            public void setClientIdentifier​(int clientIdentifier)
            Description copied from interface: FileTransferData
            An ID value that identifies this client to the FileCatalyst Server.
            Specified by:
            setClientIdentifier in interface FileTransferData
            Parameters:
            clientIdentifier - int
          • setCongestionControlAggression

            public void setCongestionControlAggression​(int congestionControlAggression)
            Description copied from interface: FileTransferData
            Specifies an aggression factor between 1 (passive) and 10 (aggressive) used by the congestion control mechanism to determine how passive or aggressive it should be in the face of network congestion.
            Specified by:
            setCongestionControlAggression in interface FileTransferData
            Parameters:
            congestionControlAggression - int Aggression factor between 1 and 10.
          • setTransferWithTempName

            public void setTransferWithTempName​(boolean transferWithTempName,
                                                int tempMode)
            Description copied from interface: FileTransferData
            With this option enabled, files will be uploaded with a temporary filename and renamed back to their original name when the transfer is complete. This allows other applications to identify files that are not complete.
            Specified by:
            setTransferWithTempName in interface FileTransferData
            Parameters:
            transferWithTempName - boolean true/false to enable or disable this feature
            tempMode - int Sets the desired mode, TransferMode.PREFIX or TransferMode.SUFFIX.
            See Also:
            TransferMode
          • testWriteSpeed

            public int testWriteSpeed()
                               throws java.io.FileNotFoundException,
                                      java.io.IOException
            Description copied from interface: FileTransferMechanism
            Perform a write to current directory with recommended values for determining storage rate.
            Specified by:
            testWriteSpeed in interface FileTransferMechanism
            Returns:
            write speed in kilobits per second
            Throws:
            java.io.FileNotFoundException
            java.io.IOException
          • testWriteSpeed

            public int testWriteSpeed​(java.nio.file.Path file,
                                      int size,
                                      int timeout)
                               throws java.io.FileNotFoundException,
                                      java.io.IOException
            Description copied from interface: FileTransferMechanism
            Perform a write to specified file with specified size and timeout for determining storage rate.
            Specified by:
            testWriteSpeed in interface FileTransferMechanism
            Parameters:
            file - file to write
            size - size of file in bytes
            timeout - timeout of write in milliseconds
            Returns:
            write speed in kilobits per second
            Throws:
            java.io.FileNotFoundException
            java.io.IOException
          • testMaximumUploadSpeed

            public int testMaximumUploadSpeed()
                                       throws unlimited.core.util.common.exception.FCException,
                                              java.io.IOException
            Description copied from interface: FileTransferMechanism
            Performs a series of tests to determine the maximum upload speed to the connected server.
            Specified by:
            testMaximumUploadSpeed in interface FileTransferMechanism
            Returns:
            int the rate detected in Kbps
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
          • testMaximumDownloadSpeed

            public int testMaximumDownloadSpeed()
                                         throws unlimited.core.util.common.exception.FCException,
                                                java.io.IOException
            Description copied from interface: FileTransferMechanism
            Performs a series of tests to determine the maximum download speed from the connected server.
            Specified by:
            testMaximumDownloadSpeed in interface FileTransferMechanism
            Returns:
            int the rate detected in Kbps
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
          • doTestWriteSpeed

            protected int doTestWriteSpeed()
                                    throws unlimited.core.util.common.exception.FCException,
                                           java.io.FileNotFoundException,
                                           java.io.IOException
            Perform a write to current directory with recommended values for determining storage rate.
            Returns:
            write speed in kilobits per second
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.FileNotFoundException
            java.io.IOException
          • doTestAproximateUploadSpeed

            protected int doTestAproximateUploadSpeed()
                                               throws java.io.IOException
            Tests the approximate upload speed by using the tester client
            Returns:
            Rate detected in Kbps
            Throws:
            java.io.IOException
          • doTestAproximateDownloadSpeed

            protected int doTestAproximateDownloadSpeed()
                                                 throws java.io.IOException
            Tests the approximate download speed by using the tester client
            Returns:
            Rate detected in Kbps
            Throws:
            java.io.IOException
          • doTestWriteSpeed

            protected int doTestWriteSpeed​(java.nio.file.Path file,
                                           int size,
                                           int timeout)
                                    throws unlimited.core.util.common.exception.FCException,
                                           java.io.FileNotFoundException,
                                           java.io.IOException
            Perform a write to specified file with specified size and timeout for determining storage rate.
            Parameters:
            file - file to write
            size - size of file in bytes
            timeout - timeout of write in milliseconds
            Returns:
            write speed in kilobits per second
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.FileNotFoundException
            java.io.IOException
          • getClientUnderTest

            protected final FileTransferMechanism getClientUnderTest()
            Returns the client that is used for test operations.
            Returns:
            FileTransferMechanism
          • doTestMaxUploadSpeed

            protected int doTestMaxUploadSpeed()
                                        throws unlimited.core.util.common.exception.FCException,
                                               java.io.IOException
            Performs a series of tests to determine the maximum upload speed from the connected server.
            Returns:
            int the rate detected in Kbps
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
          • doTestMaxDownloadSpeed

            protected int doTestMaxDownloadSpeed()
                                          throws unlimited.core.util.common.exception.FCException,
                                                 java.io.IOException
            Performs a series of tests to determine the maximum download speed from the connected server.
            Returns:
            int the rate detected in Kbps
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
          • filesMatch

            public boolean filesMatch​(java.nio.file.Path file,
                                      java.lang.String rFile,
                                      unlimited.core.util.common.CancelHandler cancelHandler)
                               throws unlimited.core.util.common.exception.FCException,
                                      java.io.IOException,
                                      java.lang.Exception
            Description copied from interface: FileTransferMechanism
            Verifies whether a local file matches a remote file using MD5 checksum
            Specified by:
            filesMatch in interface FileTransferMechanism
            Parameters:
            file - Local file
            rFile - Remote file
            cancelHandler - Cancel Handler
            Returns:
            true if the local file matches the remote file, false if they don't match
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
            java.lang.Exception
          • filesMatch

            public boolean filesMatch​(java.nio.file.Path file,
                                      java.lang.String rFile)
                               throws unlimited.core.util.common.exception.FCException,
                                      java.io.IOException,
                                      java.lang.Exception
            Description copied from interface: FileTransferMechanism
            Verifies whether a local file matches a remote file using MD5 checksum
            Specified by:
            filesMatch in interface FileTransferMechanism
            Parameters:
            file - Local file
            rFile - Remote file
            Returns:
            true if the local file matches the remote file, false if they don't match
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
            java.lang.Exception
          • filesMatch

            public boolean filesMatch​(java.nio.file.Path file,
                                      java.lang.String rFile,
                                      int md5RateLimit)
                               throws unlimited.core.util.common.exception.FCException,
                                      java.io.IOException,
                                      java.lang.Exception
            Description copied from interface: FileTransferMechanism
            Verifies whether a local file matches a remote file using MD5 checksum
            Specified by:
            filesMatch in interface FileTransferMechanism
            Parameters:
            file - Local file
            rFile - Remote file
            md5RateLimit - limits the rate of MD5 checksum on local file. This will stop MD5 from consuming too much I/O
            Returns:
            true if the local file matches the remote file, false if they don't match
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
            java.lang.Exception
          • filesMatch

            public 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.Exception
            Description copied from interface: FileTransferMechanism
            Verifies whether a local file matches a remote file using MD5 checksum
            Specified by:
            filesMatch in interface FileTransferMechanism
            Parameters:
            file - Local file
            rFile - Remote file
            md5RateLimit - limits the rate of MD5 checksum on local file. This will stop MD5 from consuming too much I/O
            cancelHandler - Cancel Handler
            Returns:
            true if the local file matches the remote file, false if they don't match
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
            java.lang.Exception
          • getMD5Checksum

            public java.lang.String getMD5Checksum​(java.lang.String rFile)
                                            throws unlimited.core.util.common.exception.FCException,
                                                   java.io.IOException
            Description copied from interface: FileTransferMechanism
            Returns the MD5 checksum for the given remote file
            Specified by:
            getMD5Checksum in interface FileTransferMechanism
            Returns:
            the MD5 checksum for the given remote file
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
          • getMD5

            public java.lang.String getMD5​(java.lang.String remote)
                                    throws unlimited.core.util.common.exception.FCException,
                                           java.io.IOException
            Description copied from interface: FileTransferMechanism
            Returns the MD5 checksum for the specified remote file if it exists
            Specified by:
            getMD5 in interface FileTransferMechanism
            Parameters:
            remote - file to checksum
            Returns:
            String representation of the remote file's MD5 checksum
            Throws:
            unlimited.core.util.common.exception.FCException - if not connected
            java.io.IOException
          • serverVersion

            public java.lang.String serverVersion()
                                           throws unlimited.core.util.common.exception.FCException
            Description copied from interface: FileTransferMechanism
            Returns the FileCatalyst server version.
            Specified by:
            serverVersion in interface FileTransferMechanism
            Returns:
            FileCatalyst Server version
            Throws:
            unlimited.core.util.common.exception.FCException - Exception thrown if not connected.
          • isFileCatalystServer

            public boolean isFileCatalystServer()
                                         throws java.io.IOException,
                                                unlimited.core.util.common.exception.FCException
            Description copied from interface: FileListDataItemSource
            Returns true if connected to a FileCatalyst server. Returns false if connected to a standard FTP server.
            Specified by:
            isFileCatalystServer in interface FileListDataItemSource
            Returns:
            true if connected to a FileCatalyst server.
            Throws:
            java.io.IOException
            unlimited.core.util.common.exception.FCException
          • isUDPSupported

            public boolean isUDPSupported()
                                   throws java.io.IOException,
                                          unlimited.core.util.common.exception.FCException
            Description copied from interface: FileTransferMechanism
            Returns true if connected to a FileCatalyst server that supports UDP.
            Specified by:
            isUDPSupported in interface FileTransferMechanism
            Returns:
            Returns false if you are not FileCatalyst or if UDP is not supported by license.
            Throws:
            java.io.IOException
            unlimited.core.util.common.exception.FCException
          • getMaxRetries

            public int getMaxRetries()
            Description copied from interface: FileTransferData
            Returns the number of times to retry a broken or interrupted transfer. Transfers will be reattempted upto the max number of retries before ultimately failing the transfer
            Default value for max retries is 10
            Specified by:
            getMaxRetries in interface FileTransferData
            Returns:
            the maxRetries
          • setMaxRetries

            public void setMaxRetries​(int maxRetries)
            Description copied from interface: FileTransferData
            Specify the number of times to retry a broken or interrupted transfer. Transfers will be reattempted upto the max number of retries before ultimately failing the transfer
            Default value for max retries is 10
            Specified by:
            setMaxRetries in interface FileTransferData
            Parameters:
            maxRetries - the maxRetries to set
          • getWaitRetry

            public long getWaitRetry()
            Description copied from interface: FileTransferData
            Returns the amount of milliseconds to wait between retries for failed transfers.
            Specified by:
            getWaitRetry in interface FileTransferData
            Returns:
            the waitRetry
          • isForceTCPmodeACKs

            public boolean isForceTCPmodeACKs()
            Description copied from interface: FileTransferData
            Returns true if TCP mode ACKs are enabled. If option is enabled, transfers will instead use TCP acknowledgement messages (ACKs) to confirm that data is received during the transfer. If the option is disabled, then transfer will use the default UDP ACK messages to ensure data is transferred.

            Note: In some cases UDP notifications may be blocked. If this is the case you may force the client to use TCP mode ACKs.

            Specified by:
            isForceTCPmodeACKs in interface FileTransferData
            Returns:
            true if TCP mode ACKs are enabled
          • setForceTCPmodeACKs

            public void setForceTCPmodeACKs​(boolean forceTCPmodeACKs)
            Description copied from interface: FileTransferData
            By default, FileCatalyst uses UDP to acknowledge data received. If option is enabled, transfers will instead use TCP acknowledgement messages (ACKs) to confirm that data is received during the transfer. If the option is disabled, then transfer will use the default UDP ACK messages to ensure data is transferred.

            Note: In some cases UDP notifications may be blocked. If this is the case you may force the client to use TCP mode ACKs.

            Specified by:
            setForceTCPmodeACKs in interface FileTransferData
            Parameters:
            forceTCPmodeACKs - true if TCP mode ACKs should be used
          • setWaitRetry

            public void setWaitRetry​(long waitRetry)
            Description copied from interface: FileTransferData
            Sets the amount of time in milliseconds to wait before the client attempts to retry a failed transfer
            Specified by:
            setWaitRetry in interface FileTransferData
            Parameters:
            waitRetry - the waitRetry to set
          • testUDPACKs

            public void testUDPACKs()
                             throws unlimited.core.util.common.exception.FCException,
                                    java.io.IOException
            Description copied from interface: FileTransferMechanism
            Tests 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.
            Specified by:
            testUDPACKs in interface FileTransferMechanism
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
          • getZipFileSizeLimit

            public long getZipFileSizeLimit()
            Description copied from interface: FileTransferData
            Returns the zip file size limit in bytes. This zip file size limit is the maximum size that a zip file can be once it is created. If a zip file exceeds this value it will be split into multiple zips, and transferred in pieces
            Specified by:
            getZipFileSizeLimit in interface FileTransferData
            Returns:
            the zipFileSizeLimit in bytes
          • setZipFileSizeLimit

            public void setZipFileSizeLimit​(long zipFileSizeLimit)
            Description copied from interface: FileTransferData
            Sets the zip file size limit to the value specified. This zip file size limit is the maximum size that a zip file can be once it is created. If a zip file exceeds this value it will be split into multiple zips, and transferred in pieces
            Specified by:
            setZipFileSizeLimit in interface FileTransferData
            Parameters:
            zipFileSizeLimit - the zipFileSizeLimit (in bytes) to set
          • isUseCongestionControl

            public boolean isUseCongestionControl()
            Description copied from interface: FileTransferData
            Returns true if congestion control is currently enabled.
            Specified by:
            isUseCongestionControl in interface FileTransferData
            Returns:
            true if congestion control is currently enabled.
          • setUseCongestionControl

            public void setUseCongestionControl​(boolean useCongestionControl)
            Description copied from interface: FileTransferData
            Enables/disables congestion control for this client. When enabled, the client will automatically decrease its transmission or reception rate when congestion is detected. Future versions will allow finer grain control over the reaction algorithm. Congestion control is set to true by default.
            Specified by:
            setUseCongestionControl in interface FileTransferData
            Parameters:
            useCongestionControl - boolean value used to turn congestion control on/off
          • setUnitSize

            public void setUnitSize​(int unitSize)
            Description copied from interface: FileTransferData
            Use setPacketSize()
            Specified by:
            setUnitSize in interface FileTransferData
            Parameters:
            unitSize - int value used to set the Unit Size. In Bytes.
          • isUseCompression

            public boolean isUseCompression()
            Description copied from interface: FileTransferData
            Returns true if compression is enabled, false otherwise.
            Specified by:
            isUseCompression in interface FileTransferData
            Returns:
            boolean True if compression is enabled, false otherwise.
          • getNumUDPSockets

            public int getNumUDPSockets()
            Description copied from interface: FileTransferData
            Return the number of Sender sockets to use
            Specified by:
            getNumUDPSockets in interface FileTransferData
            Returns:
            the Number of UDP Sockets currently set
          • setNumUDPSockets

            public void setNumUDPSockets​(int numUDPSockets)
            Description copied from interface: FileTransferData
            Sets the number of UDP sockets to use when uploading a file in UDP mode. Increasing the number of sockets used may boost performance at high speeds (i.e. greater than 500 Mbps)
            Specified by:
            setNumUDPSockets in interface FileTransferData
            Parameters:
            numUDPSockets - the Number of UDP Sockets to set
          • autoDetectConectionMode

            public void autoDetectConectionMode()
            Description copied from interface: FileTransferMechanism
            Tests what type of connection mode should be used for the transfer. First tests UDP, then FTP, then finally HTTP. If a valid connection mode is found, the internal connection mode will be set to that value, and this method will return.
            Specified by:
            autoDetectConectionMode in interface FileTransferMechanism
          • getNumThreads

            public int getNumThreads()
            Description copied from interface: FileTransferData
            Returns the number of threads that will be used at most for each FC transmission.
            Specified by:
            getNumThreads in interface FileTransferData
            Returns:
            the number of threads that will be used at most for each FC transmission.
          • setNumThreads

            public void setNumThreads​(int numThreads)
            Description copied from interface: FileTransferData
            This value determines how many blocks will be sent into the pipe before redundant data will be sent. In high RTT environments, this value multiplied by the block size should be higher than the product of the RTT and the target rate. Depending on the speed and spec of the disk, it may be advantageous to have more threads with a higher block size or vise versa. Number of threads is set to 5 by default.
            Specified by:
            setNumThreads in interface FileTransferData
            Parameters:
            numThreads - Number of block sender threads to start for each transmission.
          • setUseCompression

            public void setUseCompression​(boolean useCompression)
            Description copied from interface: FileTransferData
            Enables/disables on the fly compression. When enabled, each block of data will be compressed on the fly before it is sent over the network.
            Specified by:
            setUseCompression in interface FileTransferData
            Parameters:
            useCompression - boolean true/false to enable/disable compression.
          • remoteUpload

            public 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 interface: FileTransferMechanism
            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). 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...
            Specified by:
            remoteUpload in interface FileTransferMechanism
            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 file
            destFile - 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

            public 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 interface: FileTransferMechanism
            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). 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...
            Specified by:
            remoteUpload in interface FileTransferMechanism
            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 transferred
            destFiles - 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
          • testApproximateUploadSpeed

            public int testApproximateUploadSpeed()
                                           throws unlimited.core.util.common.exception.FCException,
                                                  java.io.IOException
            Description copied from interface: FileTransferMechanism
            Performs a quick test to determine the approximate upload speed to the connected server.
            Specified by:
            testApproximateUploadSpeed in interface FileTransferMechanism
            Returns:
            int the rate detected in Kbps
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
          • testApproximateDownloadSpeed

            public int testApproximateDownloadSpeed()
                                             throws unlimited.core.util.common.exception.FCException,
                                                    java.io.IOException
            Description copied from interface: FileTransferMechanism
            Performs a quick test to determine the approximate download speed to the connected server.
            Specified by:
            testApproximateDownloadSpeed in interface FileTransferMechanism
            Returns:
            int the rate detected in Kbps
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
          • getClients

            protected com.google.common.collect.HashBiMap<java.lang.Integer,​FileTransferMechanism> getClients()
            Returns the current clients being used by the manager
            Returns:
          • createWorkerThreads

            protected boolean createWorkerThreads()
            Creates the worker threads to be used by this Multi-Client instance
            Returns:
            Whether or not the operation succeeded
          • shutDownWork

            protected void shutDownWork()
            Shuts down the manager's current work
          • pushJob

            public MultiClientTransferHook pushJob​(TransferJob job)
                                            throws unlimited.core.util.common.exception.FCException,
                                                   java.io.IOException
            Queries the internal state machine to add a TransferJob into the current queue of pending work. Once the job submitted, it is scanned and remove of all duplicate work. If the TransferJob has work remaining within it, it is then added to the list of pending work, it will attempted once the next available client asynchronously pulls it out of the queue and begins to transfer it.

            Note: If the Manager is in a CancelTypeState, then job will be ignored. No new work may placed into the MultiClientManager if it is in the middle of it's cancel operations

            Parameters:
            job - TransferJob to be attempted in the future
            Returns:
            A TransferHook that gives qualitative and quantitative data for the transfer job
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
          • pushJobNoProcessing

            public MultiClientTransferHook pushJobNoProcessing​(TransferJob job)
                                                        throws unlimited.core.util.common.exception.FCException,
                                                               java.io.IOException
            Pushes a new TransferJob into the current TransferJobQueue. Does not PreProcess the data before submission
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
          • pushJobOntoWorkQueue

            protected MultiClientTransferHook pushJobOntoWorkQueue​(TransferJob job)
            Pushes a new TransferJob into the current queue. Fires a TransferJobTransferRejectionEvent if it fails
            Parameters:
            job - TransferJob to push
            Returns:
            Main transferhook
          • getNextJob

            protected TransferJob getNextJob()
                                      throws java.lang.InterruptedException
            Returns the next job to be attempted by this object
            Returns:
            TransferJob to be attempted
            Throws:
            java.lang.InterruptedException
          • doJob

            protected void doJob​(TransferRunner runner)
                          throws unlimited.core.util.common.exception.FCException,
                                 java.io.IOException
            Calls the current state to execute the supplied runner. If the system isn't currently in a transferring state, it will placed in one
            Parameters:
            runner - Runnable wrapper of a transfer job that is to be executed
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
          • handleTransferStart

            protected void handleTransferStart​(TransferHook hook,
                                               TransferRunner runner)
            Method that performs the operations relating to transfer start. IE moving clients to the active list, and adding the respective TransferHook to the MultiClient's current TransferHook. Also fires a property change eventof type TransferJobTransferringEvent
            Parameters:
            hook - Transfer that has started
            runner - Runner that has started to transfer
          • moveClientToActive

            protected void moveClientToActive​(FileTransferMechanism client)
            Moves the client to the current active list. Removes the client from the idle list if it exists
            Parameters:
            client -
          • getRateUpdater

            protected java.lang.Runnable getRateUpdater()
          • moveClientToIdle

            protected void moveClientToIdle​(FileTransferMechanism client)
            Moves the client to idle list. Removes client from the active list if it is present there
            Parameters:
            client -
          • handleTransferStop

            protected void handleTransferStop​(TransferHook hook,
                                              TransferRunner runner)
            Method that performs the operations relating to transfer stop. IE moving clients to the idle list, and removing the respective TransferHook from the Multi-Client's current transfer hook. Also attempts to retry the TransferJob if it fails in a non-fatal manner
            Parameters:
            hook - Transfer that has started
            runner - Runner that has started to transfer
          • handleFailedTransfer

            protected void handleFailedTransfer​(TransferHook hook,
                                                FileTransferMechanism client,
                                                TransferJob job)
            Handles a failed transfer event when called. Executed when an individual client transfer fails
            Parameters:
            hook - Transfer data object containing the data for the transfer
            client - TransferMechanism that was failed the transfer
            job - Transfer job that was failed
          • handleSuccessfulTransfer

            protected void handleSuccessfulTransfer​(TransferHook hook,
                                                    FileTransferMechanism client,
                                                    TransferJob job)
            Handles a successful transfer event when called. Executed when an individual client completes it's transfer
            Parameters:
            hook - Transfer data object containing the data for the transfer
            client - TransferMechanism that completed the transfer
            job - Transfer job that was completed
          • endJob

            protected void endJob​(FileTransferMechanism client,
                                  TransferJob job,
                                  TransferHook hook)
            Method that performs the necessary logic for processing TransferJob that has completed. Also publishes reports and cleans up after the transfer
            Parameters:
            client - Client that transferred the job
            job - Job that has been completed
            hook - TransferHook that contains the information for the job itself
          • completeClientFailure

            public void completeClientFailure​(TransferJob job,
                                              TransferHook hook)
            Method that handles marks failed transfers, and fires the corresponding TransferJobFailureEvents. Should only be implicitly called by internal mechanisms
            Parameters:
            job - Transfer Job that failed to transfer
            hook - TransferHook that contains information about the failed transfer
          • jobSuccess

            public void jobSuccess​(FileTransferMechanism client,
                                   TransferJob job,
                                   TransferHook hook)
            Method that handles marks successful transfers, and fires the corresponding TransferJobTransferSuccessEvent. Should only be implicitly called by internal mechanisms
            Parameters:
            job - Transfer Job that succeeded in transferring
            hook - TransferHook that contains information about the successful transfer transfer
          • setRunningIntegrationTest

            public void setRunningIntegrationTest​(boolean isRunning)
            Internal use only: Sets whether or not this MultiClientManager is running in an integration test
            Parameters:
            isRunning - Boolean to set
          • getMaxWorkQueueRePush

            public int getMaxWorkQueueRePush()
            Returns:
            maximum times a failed transfer job will be returned to the work queue before being deemed complete failure
          • setMaxWorkQueueuRePush

            public void setMaxWorkQueueuRePush​(int maxPush)
            Sets the max amount of times a failed transfer job will be returned to the work queue after a failure
            Parameters:
            maxPush - - maximum times a failed transfer job will be returned to the work queue before being deemed complete failure
          • returnJob

            protected void returnJob​(TransferJob job)
            Returns the supplied the TransferJob to the queue
            Parameters:
            job -
          • returnJob

            protected void returnJob​(TransferJob job,
                                     TransferHook hook)
            Returns the supplied the TransferJob to the queue
            Parameters:
            job -
          • cleanupClient

            protected void cleanupClient​(FileTransferMechanism client)
                                  throws unlimited.core.util.common.exception.FCException,
                                         java.io.IOException
            Cleans up the client if it is needed
            Parameters:
            client -
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
          • workRemaining

            public boolean workRemaining()
            Returns whether or not the MultiClientManager has any work remaining within it's queue.
            Returns:
            true, if successful
          • getPendingWorkCount

            public int getPendingWorkCount()
            Gets the pending work count.
            Returns:
            the pending work count
          • synchClient

            protected boolean synchClient​(FileTransferMechanism client)
                                   throws unlimited.core.util.common.exception.FCException,
                                          java.io.IOException
            Syncs the supplied FileTransferMechanism's current settings to the settings within the MultiClient.
            Parameters:
            client - TransferMechanism to sync to the system
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
          • safeSynchClient

            protected boolean safeSynchClient​(FileTransferMechanism client)
            Safely syncs the client to the system. If exception is thrown, the Manager will dump the stack trace and return false
            Parameters:
            client - TransferMechanism to sync to the system
            Returns:
            True if successful, false if not
          • setCompFileFilter

            public void setCompFileFilter​(java.lang.String compFileFilter)
            Description copied from interface: FileTransferData
            Sets the compression FileFilter that is to be used by the implementation
            Specified by:
            setCompFileFilter in interface FileTransferData
            Parameters:
            compFileFilter - Filter to set
          • setTransferEmptyDirectories

            public void setTransferEmptyDirectories​(boolean transferEmptyDirectories)
            Description copied from interface: FileTransferData
            Sets whether or not the implementation should transfer empty directories
            Specified by:
            setTransferEmptyDirectories in interface FileTransferData
            Parameters:
            transferEmptyDirectories - Boolean value to set
          • setPostURL

            public void setPostURL​(java.lang.String postURL)
            Description copied from interface: FileTransferData
            Sets the current post URL to the value that is defined
            Specified by:
            setPostURL in interface FileTransferData
            Parameters:
            postURL - New postURL to use
          • setMd5RateLimit

            public void setMd5RateLimit​(int md5RateLimit)
            Description copied from interface: FileTransferData
            Sets the rate limit to use when calculating MD5s of files
            Specified by:
            setMd5RateLimit in interface FileTransferData
            Parameters:
            md5RateLimit - Limit to use
          • setRenameExtension

            public void setRenameExtension​(boolean renameExtension)
            Description copied from interface: FileTransferData
            Sets whether or not the rename extension should be used
            Specified by:
            setRenameExtension in interface FileTransferData
            Parameters:
            renameExtension - Enabled boolean
          • serverSupportsFSEvents

            public boolean serverSupportsFSEvents()
                                           throws unlimited.core.util.common.exception.FCException,
                                                  java.io.IOException
            Description copied from interface: FileTransferMechanism
            This returns true if the server supports file system events. In general this means that the server is a FileCatalyst server and also is post 2.8.1.
            Specified by:
            serverSupportsFSEvents in interface FileTransferMechanism
            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.
          • fileSystemEvents

            public java.util.List<FileSystemEvent> fileSystemEvents​(long timeout)
                                                             throws java.io.IOException,
                                                                    unlimited.core.util.common.exception.FCException
            Description copied from interface: FileTransferMechanism
            Collects the list of file system events from the Server.

            File system events are local events that are triggered on the Server whenever a monitored local file system changes in some manner. Example file system invents include: creating new files, deleting files, modifying existing files, and renaming files to other paths

            Specified by:
            fileSystemEvents in interface FileTransferMechanism
            Parameters:
            timeout - Amount of time that you wish to wait for file system events to appear on the FC Server
            Throws:
            java.io.IOException
            unlimited.core.util.common.exception.FCException
          • setCancelled

            protected void setCancelled()
            Calls the Manager to asynchrously cancel it's current transactions and close all available resources. Do note that the Manager may not be fully cancelled once this method returns. To properly wait for cancellation completion, register a CancelledState signal then wait for that signal to fire.
          • cancelJobs

            protected void cancelJobs()
            Takes the pending jobs and adds them to the unattempted job list
          • closeResources

            protected void closeResources()
            Shuts and cancels the Multi-Manager's current resources
          • closeAllStreams

            protected void closeAllStreams()
          • prms

            public java.lang.String[] prms​(java.lang.String filename)
                                    throws unlimited.core.util.common.exception.FCException,
                                           java.io.IOException
            Description copied from interface: FileListDataItemSource
            Return the file permission of the file/directory listed in the argument from the remote server.
            Specified by:
            prms in interface FileListDataItemSource
            Returns:
            permissions
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
          • getPendingJobs

            public java.util.Vector<TransferJob> getPendingJobs()
            Gets the pending jobs.
            Returns:
            the pending jobs
          • getActiveJobs

            public java.util.Vector<TransferJob> getActiveJobs()
            Gets the currently active jobs that are being executed by this MultiClientManager.
            Returns:
            the active jobs
          • getTransferRate

            public int getTransferRate()
            Description copied from interface: FileTransferData
            Returns the implementation's current transfer rate
            Specified by:
            getTransferRate in interface FileTransferData
            Returns:
            The current rate
          • getReadOnlyClient

            public FileTransferMechanism getReadOnlyClient​(java.lang.Integer id)
            Gets the read only client.
            Parameters:
            id - the id
            Returns:
            the read only client
          • getBlastRate

            @Deprecated
            public int getBlastRate()
            Deprecated.
            Method deprecated. Use getTransferRate() instead
            Returns the implementation's current blast rate
            Specified by:
            getBlastRate in interface FileTransferData
            Returns:
            Current transfer rate
          • getServerAgentID

            public java.lang.String getServerAgentID()
            Description copied from interface: FileTransferData
            Returns the server's current agent ID. Used with Central monitoring and management
            Specified by:
            getServerAgentID in interface FileTransferData
            Returns:
            Server agent ID
          • getSessionID

            public java.lang.String getSessionID()
            Description copied from interface: FileTransferData
            Returns the current session ID of the implementation
            Specified by:
            getSessionID in interface FileTransferData
            Returns:
            The session ID
          • getSessionCount

            public int getSessionCount()
            Description copied from interface: FileTransferData
            Returns the current number of active sessions that the implementation has
            Specified by:
            getSessionCount in interface FileTransferData
            Returns:
            Current number of sessions
          • getCompFileFilter

            public java.lang.String getCompFileFilter()
            Description copied from interface: FileTransferData
            Sets the compression FileFilter that is to be used by the implementation. If a file is queued for compression and sucessfully passes this filter, it will be compressed prior to transferring. If the file is doesn't pass the filter, then it is not compressed, but is still transferred
            Specified by:
            getCompFileFilter in interface FileTransferData
            Returns:
            Current compression file filter
          • getTransferEmptyDirectories

            public boolean getTransferEmptyDirectories()
            Description copied from interface: FileTransferData
            Returns whether not the implementation is set to transfer empty directories.
            Specified by:
            getTransferEmptyDirectories in interface FileTransferData
            Returns:
            True if implementation will transfer empty directories, false if not
          • getMd5RateLimit

            public int getMd5RateLimit()
            Description copied from interface: FileTransferData
            Returns the current MD5 that is set. Limit is used to limit the amount of CPU usage and speed that for MD5s
            Specified by:
            getMd5RateLimit in interface FileTransferData
            Returns:
            Current MD5 rate that is set
          • getRenameExtension

            public boolean getRenameExtension()
            Description copied from interface: FileTransferData
            Returns whether or not the rename extension will be used. If true, transfers of files with the extension .RDY will rename both the source and destination files to have the extension .PKD
            Specified by:
            getRenameExtension in interface FileTransferData
            Returns:
            Boolean dictating the use of the rename extension
          • get

            public 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 java.io.IOException,
                            unlimited.core.util.common.exception.FCException,
                            java.security.NoSuchAlgorithmException,
                            unlimited.core.util.common.exception.FCException,
                            java.io.IOException
            Description copied from interface: FileListDataItemSource
            Downloads a file from the FC Server, and places it on the file system.
            Specified by:
            get in interface FileListDataItemSource
            Parameters:
            localPath - Location of where to store the file after it has been downloaded
            remoteFile - Remote file to be downloaded from the Server
            inRate - Rate to use for the download transfer
            offset - Location in the local file to start placing downloaded data into (0 = start of file)
            size - Amount of date to retrieve from the FC Server. (Typically this is (remote file size - (offset))
            numDFEncoders - Number of encoders to use for the
            blockSize - Size of blocks to be used in the download transfer
            unitSize - Size of the individual units in the download transfer. Value with compared with the Server's max unit size. Minimum of the two values will be used
            mode - Transfer mode to be used for the download. Available modes can be at TransferMode
            Throws:
            java.io.IOException
            unlimited.core.util.common.exception.FCException
            java.security.NoSuchAlgorithmException
          • workInProgress

            public boolean workInProgress()
            Returns whether or not the MultiClientManager has any work that is currently in progress
            Returns:
            true, if successful
          • isCancelled

            public boolean isCancelled()
            Returns whether or not the MultiClientManager has been cancelled
            Returns:
            True if in a CancelledState, false otherwisze
          • isBadState

            public boolean isBadState()
            Returns whether or not the current state is a bad state.
            Returns:
            true, if is bad state
          • applyRemoteFileAttributesToLocalFile

            public void applyRemoteFileAttributesToLocalFile​(java.nio.file.Path localFile,
                                                             java.lang.String remoteFile)
                                                      throws java.io.IOException
            Description copied from interface: FileTransferMechanism
            Applies the remote file attributes to the local file instance. Method performs this functionality by attempting to fetch the remote ACLs, and file permissions from the remote Server then apply them to the local file.

            Specified by:
            applyRemoteFileAttributesToLocalFile in interface FileTransferMechanism
            Parameters:
            localFile - Path of the local file that you wish to change
            remoteFile - Path of the remote tile that you would like the attributes from
            Throws:
            java.io.IOException
          • sendEmail

            public void sendEmail​(java.lang.String emailAddress,
                                  int emailConst,
                                  java.lang.String emailText)
                           throws unlimited.core.util.common.exception.FCException,
                                  java.io.IOException
            Description copied from interface: FileTransferMechanism
            Sends an email with the specified information.

            Note: Email constant can value can be any of the following

            • 0: Upload completed successfully
            • 1: Download completed successfully
            • 2: Upload failed
            • 3: Download failed
            • 4: Client email test
            • 5: Transfer Cancelled
            • 6: Upload completed with exceptions
            • 7: Download completed with exceptions
            • 8: HotFolder shutdown notification/li>
            Specified by:
            sendEmail in interface FileTransferMechanism
            Parameters:
            emailAddress - Email address to send the email to
            emailConst - Value that the Email should have within it. Can be 0 - 8 (0 == Successful_Upload, 1 == Successful Download, etc)
            emailText - Text that will be contained within the email itself
            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.
          • getTransferHook

            public MultiClientTransferHook getTransferHook()
            Gets the Master Transfer hook. This hook is *NOT THREAD SAFE* call getMultiHook() to get a thread safe representation of this hook.
            Returns:
            the transfer hook
          • getMultiHook

            public ThreadSafeMultiHook getMultiHook()
            Gets an updated representation of the MultiClientTransferHook getTransferHook(). This hook is thread safe but only updated on 500 ms broadcasts. calling getTransferHook() is more accurate but due to the fact that it is managing core engine classes can cause unexpected results in a multi threaded environment.
            Returns:
            the transfer hook
          • getSynchedClient

            public FileTransferMechanism getSynchedClient()
                                                   throws unlimited.core.util.common.exception.FCException
            Gets the synched client.
            Returns:
            the synched client
            Throws:
            unlimited.core.util.common.exception.FCException
          • rmdirRecursive

            public void rmdirRecursive​(FileListDataItem fileListDataItem)
                                throws java.lang.Exception
            Description copied from interface: FileTransferMechanism
            Deletes a directory on the server in a recursive manner.
            Specified by:
            rmdirRecursive in interface FileTransferMechanism
            Parameters:
            fileListDataItem - Directory that should be deleted
            Throws:
            java.lang.Exception - IOException or FCException depending on the issue encountered
          • getFileFilter

            public FileCatalystFileFilter getFileFilter()
            Description copied from interface: FileTransferData
            Returns the current file filter that is used to filter out information for a transfer. If a file is queued for transfer and passes the filter's current settings, then it will transferred. Otherwise it will be ignored.
            Specified by:
            getFileFilter in interface FileTransferData
            Returns:
            Current file filter
          • isTransferEmptyDirectories

            public boolean isTransferEmptyDirectories()
            Description copied from interface: FileTransferData
            Returns whether or not the implementation should be transferring empty directories
            Specified by:
            isTransferEmptyDirectories in interface FileTransferData
            Returns:
            true or false
          • getPoolSize

            public int getPoolSize()
            Returns the number of clients this MultiClient manager has access to
            Returns:
          • nullClients

            protected void nullClients()
            Resets all information by clearing all internal clients (idle, worker, and transferring), and the main transferhook.

            Note: Method should only be called by the resources responsible for finishing the MultiClientManager

          • isInitialized

            public boolean isInitialized()
            Description copied from interface: FileTransferMechanism
            Returns true if the last auto-detect that was performed identified that at least one mode of transfer was possible for the given type (upload, download, or both directions). Returns false if no transfer modes are working
            Specified by:
            isInitialized in interface FileTransferMechanism
            Returns:
          • getActiveClientsCopy

            public java.util.HashSet<FileTransferMechanism> getActiveClientsCopy()
            Gets a list that contains an independent copy of a client objects that are currently performing work.
            Returns:
            the active clients copy
          • startUpdatingTargetRate

            protected void startUpdatingTargetRate()
          • getTransferringRateSlice

            protected int getTransferringRateSlice()
          • getIdleRateSlice

            protected int getIdleRateSlice()
          • getTargetRateSlice

            protected int getTargetRateSlice()
          • remoteSynchFile

            public void remoteSynchFile​(FileListDataItem aFile)
                                 throws unlimited.core.util.common.exception.FCException
            Description copied from interface: FileTransferMechanism
            Syncs a FileListDataItem object with it's current remote information. This is useful for progressive downloads when the updated value of the FileListData is required.
            Note: The FileListDataItem file type will only be synced if the value is FileListDataItem.UNKNOWN
            Specified by:
            remoteSynchFile in interface FileTransferMechanism
            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

            public java.util.stream.Stream<FileListDataItem> remoteSynchFile​(java.util.stream.Stream<FileListDataItem> fileStream)
                                                                      throws unlimited.core.util.common.exception.FCException
            Description copied from interface: FileTransferMechanism
            Syncs a stream of FileListDataItem objects with it's current remote information. This is useful when there is a large amount of files that need to be synced at a given time. If stream encounters an exception when processing an item, it will throw a RuntimeException that should be caught.
            • Note 1: The FileListDataItem file type will only be synced if the value is FileListDataItem.UNKNOWN
            • Note 2: Make sure to close this stream before attempting to perform any other commands against the Server. If you don't close the stream, the Server will be stuck processing the command, and will be unable to process other commands that come in.
            Specified by:
            remoteSynchFile in interface FileTransferMechanism
            Parameters:
            fileStream - Stream of FileListData items that you wish to sync with the FileCatalyst Server
            Returns:
            Throws:
            unlimited.core.util.common.exception.FCException
          • removeActiveJob

            public void removeActiveJob​(TransferJob job)
            Removes the active job from pending jobs list and the main filter
            Parameters:
            job - Job to remove
          • setFileCache

            public void setFileCache​(CachedFileIndexInterface fileCache)
            Sets the file cache.
            Parameters:
            fileCache - the new file cache
          • getFileSizeThreshHold

            public long getFileSizeThreshHold()
            Gets the file size thresh hold.
            Returns:
            the file size thresh hold
          • setFileSizeThreshHold

            public void setFileSizeThreshHold​(long fileSizeThreshHold)
            Sets the file size thresh hold.
            Parameters:
            fileSizeThreshHold - the new file size thresh hold
          • setClientName

            public void setClientName​(java.lang.String clientName)
            Description copied from interface: FileTransferData
            Sets the current client name to the value that is specified
            Specified by:
            setClientName in interface FileTransferData
            Parameters:
            clientName - Name to set
          • setClientWorkingPath

            public void setClientWorkingPath​(java.nio.file.Path clientWorkingPath)
            Description copied from interface: FileTransferData
            Sets the client's current working path to the value specified
            Specified by:
            setClientWorkingPath in interface FileTransferData
            Parameters:
            clientWorkingPath - Working path to set
          • setClientAgentID

            public void setClientAgentID​(java.lang.String clientAgentID)
            Description copied from interface: FileTransferData
            Sets the current client agent ID to the new specified value. Do note that this ID value is used to distinguish this client and it's transfers from other clients in the reports
            Specified by:
            setClientAgentID in interface FileTransferData
            Parameters:
            clientAgentID - New ID to set
          • getReport

            public unlimited.fc.reporting.MultiClientDataReport getReport()
            Description copied from interface: FileTransferMechanism
            this returns the report that was filled by the FCClientEngine. If there is no report, this returns null.
            Specified by:
            getReport in interface FileTransferMechanism
            Returns:
            AbstractDataReport
          • resetStickySessionProducer

            public void resetStickySessionProducer()
          • setSessionID

            public void setSessionID​(java.lang.String sessionID)
            Description copied from interface: FileTransferData
            Sets the session ID to the specified value.
            Specified by:
            setSessionID in interface FileTransferData
          • resetPooledClientIfNeeded

            protected void resetPooledClientIfNeeded​(FileTransferMechanism client)
            Resets the provided FileTransferMechanism by clearing it's information and throwing it back into the WorkerPool of clients responsible for grabbing work for the currently pending queue. Do note that if the pool has been already shutdown, this method will do nothing
            Parameters:
            client - Client to reset after a transfer completes
          • getClientIdentifier

            public int getClientIdentifier()
            Returns the identifier for this transfer mechanism. List of valid identifiers can be found at LicenseIdentifiers
            Specified by:
            getClientIdentifier in interface FileTransferData
            Returns:
            Number value representing the type of client this TransferMechanismData comes from.
          • getClientSubIdentifier

            protected int getClientSubIdentifier()
            Returns the current sub identifier that identifies this client as a sub component of a broader group of client apps. For example, client id 9 means FC Web, but doesn't indicate which applet is connecting. Or CLI identifier doesn't let you know if its Java or C++ CLI.
            Returns:
            Integer representing the sub identifier
          • getAllWork

            public java.util.List<TransferJob> getAllWork()
            Returns ALL work that this MultiClient Manager has. Combines the the pending, active, and processing job lists into one consolidated list
            Returns:
            List containing all of the transfer jobs the Manager has in memory
          • getActivePreProcessorInfo

            public java.util.HashMap<java.lang.String,​? extends HandlerData> getActivePreProcessorInfo()
            Returns the active preprocessor info.
            Returns:
          • setRealPwd

            protected java.lang.String setRealPwd()
                                           throws unlimited.core.util.common.exception.FCException,
                                                  java.io.IOException
            Sets the working directory of the client
            Returns:
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
          • getRealPwd

            protected java.lang.String getRealPwd()
                                           throws unlimited.core.util.common.exception.FCException,
                                                  java.io.IOException
            Returns the current working directory for the remote connection. If the directory isn't currently initialized, then the system will initialize the value, then return that information
            Returns:
            Current working directory of the remote Server connection
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
          • refreshMaster

            public void refreshMaster()
            Refreshes the master client by disconnecting and reconnecting into the present working directory
          • addStream

            public <T> java.util.stream.Stream<T> addStream​(java.util.stream.Stream<T> stream)
            Adds a stream into the current stream list
            Parameters:
            stream - Stream to add
          • removeStream

            public void removeStream​(java.util.stream.Stream<?> stream)
            Removes the stream from current stream list
            Parameters:
            stream - Stream to remove
          • checkTimeout

            @Deprecated
            public void checkTimeout()
                              throws unlimited.core.util.common.exception.FCException,
                                     java.io.IOException
            Deprecated.
            This literally does nothing it is empty code. The concept of checking for timeout does not work with pooled clients that are connected on demand.
            Specified by:
            checkTimeout in interface FileTransferMechanism
            Specified by:
            checkTimeout in interface RemoteFileSystemSource
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
          • setDataReportWriter

            public void setDataReportWriter​(unlimited.fc.reporting.CSVReportWriter reportWriter)
            Sets the CSVReportWriter that is used to write transfer reports to disk
            Parameters:
            reportWriter - Writer to use
          • login

            public void login()
                       throws unlimited.core.util.common.exception.FCException,
                              java.io.IOException
            Logs the Multi-Manager with the currently stored username and password
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
          • getTransferData

            public TransferMechanismData getTransferData()
            Returns a clone of the data object that contains all of the transfer settings for this MultiClientManager
            Returns:
            Data object containing the transfer settings
          • initDeleteAfterTransfer

            public <T> void initDeleteAfterTransfer​(unlimited.core.util.common.tuples.Pair<java.util.LinkedList<T>,​java.util.HashSet<T>> dirsToBeDeleted)
            Initializes the delete after transfer if it is needed. If delete after transfer is enabled, this method will add a DeleteAfterTransferListener to the Manager's current listener list. This listener will be responsible for deleting all files after they have been successfully transferred
            Parameters:
            dirsToBeDeleted -
          • clientsCanStillTransfer

            public boolean clientsCanStillTransfer()
            Returns whether or not the client can still transfer
            Returns:
            True or false
          • close

            public void close()
                       throws java.lang.Exception
            Closes the Manager, and finishes the connection. Once the connection is finished, the Manager is becomes unuseable, and a new one must be constructed
            Specified by:
            close in interface java.lang.AutoCloseable
            Throws:
            java.lang.Exception
          • stopReporting

            protected void stopReporting()
          • startReporting

            protected void startReporting()
          • getReportWriter

            public unlimited.fc.reporting.MultiClientReportWriter getReportWriter()
            For Testing Purposes Only
          • requestCancel

            public void requestCancel()
            Requests the Multi-Client Manager to cancel the current transfer. Cancellation is an asynchronous process that is best checked with StateListeners and listening for the CancelledState events.
          • isTransferComplete

            public boolean isTransferComplete()
            Returns whether or not the MultiClientManager has completed it's current transfer.
            Returns:
            True if transfer complete, false if nto
          • handleCurrentState

            public void handleCurrentState​(StateHandler handler)
            Calls the state handler to handle the current state. Uses a double dispatching system to invoke particular functionality for particular states
            Parameters:
            handler - State that is to be handled
          • setDisableForceFlush

            public static void setDisableForceFlush​(boolean dff)
            Calling this method will set the system property that specifies if a transfer should force the file metadata to update on each write (disabled = true) or should wait until the file is complete (disabled = false).
            Parameters:
            dff -
          • getHandlerMap

            public java.util.HashMap<java.lang.String,​HandlerData> getHandlerMap()
          • getHandlerData

            public HandlerData getHandlerData​(java.lang.Integer id)
          • addPostprocess

            public void addPostprocess​(PostProcessor<?> processor)
            Adds a PostProcess to the client's current processor list
            Parameters:
            processor - - processors are executed in the order they are added unless added with an index
          • addPreprocess

            public void addPreprocess​(PreProcessor processor)
            Adds a PreProcessor to the clien's current processor list
            Parameters:
            processor - - processors are executed in the order they are added unless added with an index
          • addProcessEventListener

            public void addProcessEventListener​(ProcessEventDispatch.ProcessEventListener listener)
            Adds an event listener that is triggered when PreProcessor and PostProcessor triggers
            Parameters:
            listener - used to monitor the status of all processors
          • isProcessing

            public boolean isProcessing()
            Returns whether or not the MultiClientManager is currently pre/post processing files.
            Returns:
            true if the manager is currently processing
          • importFile

            public void importFile​(java.nio.file.Path aFile)
                            throws java.io.IOException
            Description copied from interface: FileTransferMechanism
            This will overwrite all settings within this object, if the values are not present within this file, the values within this object are reset to defaults. There are no partial imports. If valid keys are paired with invalid values, defaults are used.
            Specified by:
            importFile in interface FileTransferMechanism
            Parameters:
            aFile - - any valid file
            Throws:
            java.io.IOException - - if there are problems reading from the file or importing the data read
          • importProperties

            public void importProperties​(java.util.Properties props)
                                  throws java.io.IOException
            Description copied from interface: FileTransferMechanism
            This will overwrite all settings within this object, if the values are not present within the properties object, the values within this object are reset to defaults. There are no partial imports. If valid keys are paired with invalid values, defaults are used.
            Specified by:
            importProperties in interface FileTransferMechanism
            Parameters:
            props - - any valid properties object
            Throws:
            java.io.IOException - - if there are problems importing the data read from the properties and writing to this object
          • exportFile

            public void exportFile​(java.nio.file.Path aFile)
                            throws java.io.IOException
            Description copied from interface: FileTransferMechanism
            Export all settings to a properties file
            Specified by:
            exportFile in interface FileTransferMechanism
            Parameters:
            aFile - - any valid file, if it does not exist it will be created, the export will overwrite any data within this file
            Throws:
            java.io.IOException - - if there are any issues
          • exportProperties

            public java.util.Properties exportProperties()
                                                  throws java.io.IOException
            Description copied from interface: FileTransferMechanism
            Export all settings to a properties object
            Specified by:
            exportProperties in interface FileTransferMechanism
            Returns:
            a properties object with all the values within this object saved to the properties object.
            Throws:
            java.io.IOException - - if there are issues reading the values from this object or writing them to the properties object.
          • getReadOnlyFromMasterClient

            public FileTransferMechanism getReadOnlyFromMasterClient()
                                                              throws unlimited.core.util.common.exception.FCException,
                                                                     java.io.IOException
            Returns a read-only client that provides read access.
            Returns:
            A connected ReadOnlyClient
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
          • isAutoMode

            public boolean isAutoMode()
            Returns whether or not the transfer mode has been set to TransferMode.AUTO
            Returns:
            True if the mode is AUTO, false if other mode
          • listNoParse

            public FileListData listNoParse​(java.lang.String directory)
                                     throws unlimited.core.util.common.exception.FCException,
                                            java.io.IOException
            Returns a remote file listing with no parsing
            Parameters:
            directory - Directory to list from
            Returns:
            FileListData that contains all files in the specified directory
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
          • setServerAgentID

            public void setServerAgentID​(java.lang.String serverAgentID)
            Description copied from interface: FileTransferData
            Sets the server agent ID to the new value
            Specified by:
            setServerAgentID in interface FileTransferData
            Parameters:
            serverAgentID - New value to set
          • setRemoteFileFilter

            public void setRemoteFileFilter​(FileCatalystFileFilter<?> filter)
                                     throws unlimited.core.util.common.exception.FCException,
                                            java.io.IOException
            Description copied from interface: RemoteFileSystemSource
            Sets the file filter to be used when listing or interacting with remote files on the FCServer.
            Specified by:
            setRemoteFileFilter in interface RemoteFileSystemSource
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
          • getUserEmailAddresss

            public java.lang.String getUserEmailAddresss()
                                                  throws java.io.IOException
            Description copied from interface: FileTransferMechanism
            Gets the connected user's email address when called
            Specified by:
            getUserEmailAddresss in interface FileTransferMechanism
            Returns:
            A string containing the user's email address
            Throws:
            java.io.IOException - If there are issues an exception will be thrown
          • setUserEmailAddress

            public void setUserEmailAddress​(java.lang.String newEmailAddress)
                                     throws java.io.IOException
            Description copied from interface: FileTransferMechanism
            Sets the connected user's email address when called
            Specified by:
            setUserEmailAddress in interface FileTransferMechanism
            Parameters:
            newEmailAddress - The New Email To Be Set
            Throws:
            java.io.IOException
          • setUserFullName

            public void setUserFullName​(java.lang.String newUserName)
                                 throws java.io.IOException
            Description copied from interface: FileTransferMechanism
            Set's The User's Name When Called
            Specified by:
            setUserFullName in interface FileTransferMechanism
            Parameters:
            newUserName - - The New User Name To Be Set
            Throws:
            java.io.IOException
          • createWeblink

            @Deprecated
            public WeblinkResult createWeblink​(java.util.List<java.lang.String> to,
                                               java.lang.String subject,
                                               java.lang.String message,
                                               FileListData files)
                                        throws unlimited.core.util.common.exception.FCException,
                                               java.io.IOException
            Deprecated.
            Description copied from interface: FileTransferMechanism
            Creates a weblink with the parameters provided by the client.
            Specified by:
            createWeblink in interface FileTransferMechanism
            Parameters:
            to - A ";" delimited list of to addresses
            subject - The subject for the email
            message - The message the user would like the email to have. Do note that this is not the email's body content
            files - The list of files that the user wishes to have in this weblink
            Returns:
            Returns the result of executing the command. Exceptions are thrown if the any of the parameters are null
            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.
          • createWeblink

            @Deprecated
            public WeblinkResult createWeblink​(java.util.List<java.lang.String> to,
                                               java.lang.String subject,
                                               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 interface: FileTransferMechanism
            Method for creating a Weblink on FC Servers.
            Specified by:
            createWeblink in interface FileTransferMechanism
            Parameters:
            to - List of to email addresses that you would like to send the link to
            subject - Subject of the email that will be sent out
            message - Message contained in the email that is sent out
            files - 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.
          • createWeblink

            public WeblinkResult createWeblink​(WeblinkDataContainer data)
                                        throws unlimited.core.util.common.exception.FCException,
                                               java.io.IOException
            Description copied from interface: FileTransferMechanism
            Creates a weblink on the FileCatalyst Server with the parameters provided by the client. Currently supported method for data creation
            Specified by:
            createWeblink in interface FileTransferMechanism
            Parameters:
            data - Data object representing the data to be used for the link itself
            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.
          • getUserPermissions

            public UserPermissionsContainer getUserPermissions()
                                                        throws unlimited.core.util.common.exception.FCException,
                                                               java.io.IOException
            Description copied from interface: FileTransferMechanism
            Gather's the current user's permissions that are enabled on the server.
            Specified by:
            getUserPermissions in interface FileTransferMechanism
            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.
          • uploadRange

            public void uploadRange​(java.nio.file.Path localFile,
                                    java.lang.String remoteFile,
                                    long offset,
                                    long length)
                             throws java.io.IOException
            Description copied from interface: FileTransferMechanism
            Uploads a range of rate for the given file. Used for patching remote files with particular ranges of data that exist on the local file instance
            Specified by:
            uploadRange in interface FileTransferMechanism
            Parameters:
            localFile - The file the patch will be drawn from
            remoteFile - The file to be patched
            offset - Starting byte for the patch
            length - Length of the patch
            Throws:
            java.io.IOException - Problems with the transfer
          • downloadRange

            public void downloadRange​(java.nio.file.Path localFile,
                                      java.lang.String remoteFile,
                                      long offset,
                                      long length)
                               throws java.io.IOException
            Description copied from interface: FileTransferMechanism
            Downloads a range of information from the remote file. Used for patching local files with particular ranges of data that exist on the remote file instance.
            Specified by:
            downloadRange in interface FileTransferMechanism
            Parameters:
            localFile - - file to be patched
            remoteFile - - the file the patch will be drawn from
            offset - - starting byte for the patch
            length - - length of the patch
            Throws:
            java.io.IOException - - problems with the transfer
          • streamWithInlineParse

            public java.util.stream.Stream<FileListDataItem> streamWithInlineParse​(java.lang.String directory)
                                                                            throws unlimited.core.util.common.exception.FCException,
                                                                                   java.io.IOException
            Description copied from interface: RemoteFileSystemSource
            Returns streaming meta data for files in the given remote directory. Use if you expect a large collection of files to be returned from the Server
            Specified by:
            streamWithInlineParse in interface RemoteFileSystemSource
            Parameters:
            directory - to get data from
            Returns:
            stream of FileListDataItems
            Throws:
            unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
            java.io.IOException - If a timeout, or other IO error occurs
          • streamWithInlineParse

            public java.util.stream.Stream<FileListDataItem> streamWithInlineParse()
                                                                            throws unlimited.core.util.common.exception.FCException,
                                                                                   java.io.IOException
            Description copied from interface: FileListDataItemSource
            Returns streaming meta data for files in the current remote directory. Use if you expect a large collection of files to be returned from the Server
            Specified by:
            streamWithInlineParse in interface FileListDataItemSource
            Returns:
            stream of FileListDataItems
            Throws:
            unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
            java.io.IOException - If a timeout, or other IO error occurs
          • canAcceptWork

            public boolean canAcceptWork()
            Returns whether or not the Multi-Manager has room in the work queueu
            Returns:
            true if it can accept more transfer jobs
          • addFocusedDelta

            public void addFocusedDelta​(unlimited.core.util.common.tuples.Quintet<java.lang.String,​java.lang.Long,​java.lang.Long,​java.lang.Long,​java.util.concurrent.TimeUnit> focusedDelta)
            Adds a focused delta to the Multi-Client's post process. The Quartet parameter contains the folling data First Item (String) - Filter to be used for the delta Second Item (Integer) - Timeout value to be used for the delta Third Item (Long) - Header byte amount Fourth Item (Long) - Footer byte amount
            Parameters:
            focusedDelta -
          • addRetransferDelta

            public void addRetransferDelta​(unlimited.core.util.common.tuples.Triplet<java.lang.String,​java.lang.Long,​java.util.concurrent.TimeUnit> retransferDelta)
            Adds a re-transfer delta PostProcessor that re-transfers deltas after a file succeeds
            Parameters:
            retransferDelta - Pair object containing the filter (string), and filter delay (integer) amount
          • addWaitForGrowth

            public void addWaitForGrowth​(unlimited.core.util.common.tuples.Triplet<java.lang.String,​java.lang.Long,​java.util.concurrent.TimeUnit> waitForGrowth)
            Adds a wait for file growth PreProcessor that waits for a file to stop growing before it's transferred
            Parameters:
            waitForGrowth - Triplet object containing the filter, timeout, and time unit
          • isWeblinkEnabledOnServer

            public boolean isWeblinkEnabledOnServer()
                                             throws java.io.IOException
            Description copied from interface: FileTransferMechanism
            Request if link is enabled on the server that you are connected too
            Specified by:
            isWeblinkEnabledOnServer in interface FileTransferMechanism
            Returns:
            True if link is enabled, false otherwise
            Throws:
            java.io.IOException - if an error occurs either connecting to the destination server, or if a transfer I/O error occurs.
          • getServerLinkExpiryDayValue

            public int getServerLinkExpiryDayValue()
                                            throws java.io.IOException
            Description copied from interface: FileTransferMechanism
            Returns the number of days that the server has configured for links to be stored. Method returns error if the functionality isn't supported on the server
            Specified by:
            getServerLinkExpiryDayValue in interface FileTransferMechanism
            Returns:
            Throws:
            java.io.IOException - if an error occurs either connecting to the destination server, or if a transfer I/O error occurs.
          • getServerConfigurationValue

            public java.lang.String getServerConfigurationValue​(java.lang.String value)
                                                         throws java.io.IOException
            Description copied from interface: FileTransferMechanism
            Gets an individual Server configuration value from the Server. The list of available requests can be found in the ServerConfigs call that is returned from FileTransferMechanism.getAllAvailableServerConfigs()
            Specified by:
            getServerConfigurationValue in interface FileTransferMechanism
            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 interface: FileTransferMechanism
            Returns all Server side configurations that the Client may be interested in.
            Specified by:
            getAllAvailableServerConfigs in interface FileTransferMechanism
            Returns:
            Data object containing the current Client-based Server configurations
            Throws:
            java.io.IOException - if an error occurs either connecting to the destination server, or if a transfer I/O error occurs.
          • modtime

            public void modtime​(FileListDataItem item)
                         throws java.io.IOException
            Description copied from interface: FileTransferMechanism
            This will update the modtime of the file existing on the server to whatever the incoming FileListDataItem is set to
            Specified by:
            modtime in interface FileTransferMechanism
            Parameters:
            item - - item with a modification time to be sent to the server;
            Throws:
            java.io.IOException
          • runWorkerClient

            protected void runWorkerClient​(FileTransferMechanismHandler handler)
                                    throws java.lang.Exception
            This allows you to use the worker client to perform operations that don't interfere with the transferring clients
            Parameters:
            handler - - user defined handler that accepts a synched FileTransferMechanism object
            Throws:
            java.lang.Exception
          • isCancelling

            public boolean isCancelling()
            Returns whether or not the manager is currently in a cancelling state
            Returns:
            True if in a cancelling state
          • isUsingDeleteAfterPostProcessor

            public boolean isUsingDeleteAfterPostProcessor()
            Returns true if we are using the delete after post processor
            Returns:
          • lastServerRestrictedRate

            public int lastServerRestrictedRate()
            Description copied from interface: FileTransferData
            Returns the last rate (kbps) that the Server had replied with. This rate takes into account what the server is imposing during a transfer bandwidth speed.
            Specified by:
            lastServerRestrictedRate in interface FileTransferData
          • getServerOverrideBandwidth

            public int getServerOverrideBandwidth()
            Description copied from interface: FileTransferData
            Returns the override bandwidth value that has been specified by server. If isServerOverrideBandwith() == false, then 0 is returned
            Specified by:
            getServerOverrideBandwidth in interface FileTransferData
            Returns:
            if isServerOverridebandwidth() is true returns the serverOverrideBandwidth otherwise returns 0;
          • isServerOverridebandwidth

            public boolean isServerOverridebandwidth()
            Description copied from interface: FileTransferData
            Returns whether or not the server has specified that the bandwidth should be overridden. If true, then the bandwidth allocated to the client will be the value specified by the current server override bandwidth. If false, then the client will attempt to transfer at the rate specified by the target rate.
            Specified by:
            isServerOverridebandwidth in interface FileTransferData
            Returns:
            true if the server is overriding the bandwidth during a transfer, always false if no transfer is happening.
          • setTransferToServerOverride

            public void setTransferToServerOverride​(int serverOverrideBW)
            Description copied from interface: FileTransferData
            Sets bandwidth value that the Server is attempting to override this client to. If the isServerOverrideBandwidth() returns true, then the client will attempt to transfer at the specified by the server override. Otherwise, it will attempt to transfer at the defined target rate.
            Specified by:
            setTransferToServerOverride in interface FileTransferData
            Parameters:
            serverOverrideBW - Kbps bandwidth value
          • setUserRelativePriority

            public void setUserRelativePriority​(int priority)
            Description copied from interface: FileTransferData
            This priority hint is to help the server distribute bandwidth within its own set parameters. The scope of the hint is for all sessions with this client's agent ID connecting to this client's user.
            Specified by:
            setUserRelativePriority in interface FileTransferData
            Parameters:
            priority - hint for server to distribute bandwidth when it would normally split it evenly.
          • getUserRelativePriority

            public int getUserRelativePriority()
            Description copied from interface: FileTransferData
            This priority hint is to help the server distribute bandwidth within its own set parameters. The scope of the hint is for all sessions with this client's agent ID connecting to this client's user.
            Specified by:
            getUserRelativePriority in interface FileTransferData
            Returns:
            priority hint for server to distribute bandwidth when it would normally split it evenly.
          • isCurrentStateInstanceof

            @SafeVarargs
            public final boolean isCurrentStateInstanceof​(java.lang.Class<? extends MultiClientState>... states)
          • delete

            public java.util.stream.Stream<unlimited.core.util.common.tuples.Pair<FileListDataItem,​java.lang.Boolean>> delete​(java.util.stream.Stream<FileListDataItem> toDelete)
            Description copied from interface: FileTransferMechanism
            Deletes a stream of files on the Server. Returns a stream containing the file and the result of the delete operation
            Specified by:
            delete in interface FileTransferMechanism
            Returns:
          • exists

            public unlimited.core.util.common.AutoClose<unlimited.core.util.common.stream.PairStream<java.lang.String,​java.lang.Boolean>> exists​(java.util.stream.Stream<java.lang.String> nameStream)
                                                                                                                                                throws unlimited.core.util.common.exception.FCException,
                                                                                                                                                       java.io.IOException
            Description copied from interface: FileTransferMechanism
            Queries the Server for existence of all files in the provided stream.

            Note: Make sure to close this stream before attempting to perform any other commands against the Server. If you don't close the stream, the Server will be stuck processing the command, and will be unable to process other commands that come in.
            Specified by:
            exists in interface FileTransferMechanism
            Returns:
            A Stream containing pairs of file name and existence (boolean)
            Throws:
            unlimited.core.util.common.exception.FCException
            java.io.IOException
          • requestUpdateServerOverrides

            public void requestUpdateServerOverrides()
            Queries the currently connected Server to provide it's currently overridden bandwidths. Method is used implicitly to balance the bandwidth distribution for individual clients contained within the MultiClientManager.

            Note: This method will only give a new value every 1000 milliseconds. If a called before that interval, the system will simply return
          • bumpPriority

            public boolean bumpPriority​(java.lang.String path)
            Bump the priority of a given pending file to the head of the pending list
            Parameters:
            path - File path to bump
            Returns:
            Whether or not the operation was successful
          • searchPending

            public java.util.List<unlimited.core.util.common.tuples.Pair<java.lang.String,​TransferJobPriority>> searchPending​(java.lang.String filter,
                                                                                                                                    int limit)
            Searches the pending work list and returns all results that match the supplied filter
            Parameters:
            filter - Filter to use for checking
            limit - Hard limit on the number of results to return
            Returns:
            List containing all files that matches the filter
          • hasWork

            public boolean hasWork()
            Returns whether or not the Manager has active or pending work
            Returns:
          • setTaskID

            public void setTaskID​(java.lang.String taskID)
            Description copied from interface: FileTransferData
            Sets the current task ID to the new value supplied
            Specified by:
            setTaskID in interface FileTransferData
          • resetSession

            public void resetSession()
            Resets the session when called. If currently transferring, this call will do nothing. If not currently transferring, then this call will query the state machine, and generate a brand new session with brand new IDs that keep it separate from other sessions.
          • getSessionManageMode

            public SessionManageMode getSessionManageMode()
            Returns the current session management mode that is used for this Manager instance
            Returns:
            The current session mode
          • setSessionManageMode

            public void setSessionManageMode​(SessionManageMode sessionManageMode)
            Sets the session management mode to the supplied value
            Parameters:
            sessionManageMode - Management mode to use
          • isCancelledOrCancelling

            public boolean isCancelledOrCancelling()
            Returns whether or not the Manager is currently canceling it's current transfers, or if it has completely cancelled it's work
            Returns:
          • isCancelledDueToError

            public boolean isCancelledDueToError()
            Returns whether or not the Manager was cancelled
            Returns:
          • setFileTransferPriority

            public void setFileTransferPriority​(int fileTransferPriority)
            Description copied from interface: FileTransferData
            Sets the FileTransferPrioriry to new new value. .

            Valid values are as follows:

            • 0 = Oldest files are transferred first
            • 1 = Newest files are transferred first
            • 2 = Smallest files are transferred first
            • 3 = Largest files are transferred first
            • 4 = No Priority for files
            Specified by:
            setFileTransferPriority in interface FileTransferData
          • isForceFileOwnershipEnabled

            public boolean isForceFileOwnershipEnabled()
            Description copied from interface: FileListDataItemSource
            Returns true if the force file ownership feature is currently enabled. If it is, then all files downloaded this client will have their ownership changed to current values for the ForceFileOwnershipUsername, and ForceFileOwnershipGroupname
            Specified by:
            isForceFileOwnershipEnabled in interface FileListDataItemSource
            Returns:
            the isForceFileOwnershipEnabled
          • setForceFileOwnershipEnabled

            public void setForceFileOwnershipEnabled​(boolean isForceFileOwnershipEnabled)
            Description copied from interface: FileListDataItemSource
            Sets whether or not the force file ownership feature is enabled. If it is, then all files downloaded this client will have their ownership changed to current values for the ForceFileOwnershipUsername, and ForceFileOwnershipGroupname
            Specified by:
            setForceFileOwnershipEnabled in interface FileListDataItemSource
            Parameters:
            isForceFileOwnershipEnabled - the isForceFileOwnershipEnabled to set
          • getForceFileOwnershipUser

            public java.lang.String getForceFileOwnershipUser()
            Description copied from interface: FileTransferData
            Returns the username to be used when attempting to force file ownership for files downloaded by the client
            Specified by:
            getForceFileOwnershipUser in interface FileTransferData
            Returns:
            the forceFileOwnershipUser
          • setForceFileOwnershipUser

            public void setForceFileOwnershipUser​(java.lang.String forceFileOwnershipUser)
            Description copied from interface: FileTransferData
            Sets the username to be used when attempting to force file ownership for files downloaded by the client
            Specified by:
            setForceFileOwnershipUser in interface FileTransferData
            Parameters:
            forceFileOwnershipUser - the forceFileOwnershipUser to set
          • getForceFileOwnershipGroup

            public java.lang.String getForceFileOwnershipGroup()
            Description copied from interface: FileTransferData
            Returns the groupname / groupID to be used when attempting to force group level ownership for files downloaded by the client.
            Note: Value is ignored if on a Windows platform
            Specified by:
            getForceFileOwnershipGroup in interface FileTransferData
            Returns:
            the forceFileOwnershipGroup
          • setForceFileOwnershipGroup

            public void setForceFileOwnershipGroup​(java.lang.String forceFileOwnershipGroup)
            Description copied from interface: FileTransferData
            Sets the groupname / groupID to be used when attempting to force group level ownership for files downloaded by the client.
            Note: Value is ignored if on a Windows platform
            Specified by:
            setForceFileOwnershipGroup in interface FileTransferData
          • siteMatch

            public boolean siteMatch​(java.lang.String host,
                                     int port,
                                     ClientCredentials creds)
            Returns whether or not the supplied information matches the information currently set in the Manager.
            Parameters:
            host - Host to check against the current host
            port - Port to check against the current port
            creds - Credentials to verify the client.
            Returns:
            True if all information matches, false otherwise
          • flushDispatch

            public void flushDispatch()
            the event listening is handled asynchronously inside the multi client manager. If you want to wait for all queued events to be cleared, use this method, it pushes an empty runnable onto the executor service responsible for dispatching all multi client manager events.
          • flushAllInternals

            public void flushAllInternals()
          • scheduleHookUpdate

            protected void scheduleHookUpdate()
            Schedules an asynchronous update for the MultiClientManager's TransferHook information. Once the operation has completed, the current getMultiHook() will be updated with the most recent information
          • flushInternalTaskDispatch

            public void flushInternalTaskDispatch()
            Flushes the internal task dispatching system and causes the calling resource to wait until the resource has been flushed also change this comment
          • streamWithInlineParse

            public 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
            Description copied from interface: RemoteFileSystemSource
            Returns streaming meta data for files in the given remote directory. Use if you expect a large collection of files to be returned from the Server
            Specified by:
            streamWithInlineParse in interface RemoteFileSystemSource
            Parameters:
            directory - to get data from
            isCancelled - cancelhandler to stop streaming
            Returns:
            stream of FileListDataItems
            Throws:
            unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
            java.io.IOException - If a timeout, or other IO error occurs
          • streamWithInlineParse

            public java.util.stream.Stream<FileListDataItem> streamWithInlineParse​(java.util.function.BooleanSupplier isCancelled)
                                                                            throws unlimited.core.util.common.exception.FCException,
                                                                                   java.io.IOException
            Description copied from interface: FileListDataItemSource
            Returns streaming meta data for files in the current remote directory. Use if you expect a large collection of files to be returned from the Server
            Specified by:
            streamWithInlineParse in interface FileListDataItemSource
            Parameters:
            isCancelled - cancel handler to stop stream on cancel
            Returns:
            stream of FileListDataItems
            Throws:
            unlimited.core.util.common.exception.FCException - If an error in the FC protocol occurs
            java.io.IOException - If a timeout, or other IO error occurs
          • getPreProcessors

            public java.util.Collection<PreProcessor> getPreProcessors()
          • getPostProcessors

            public java.util.Collection<PostProcessor<?>> getPostProcessors()
          • getStickySessionID

            public java.util.function.Supplier<java.lang.String> getStickySessionID()
            Description copied from interface: FileTransferMechanism
            Returns the current supplier that is used to generate the unique sticky session identifier that the FileCatalyst Client use when the connect to the FileCatalyst LoadBalancer
            Specified by:
            getStickySessionID in interface FileTransferMechanism
            Returns:
            Supplier that produces a unique ID
          • setStickySessionID

            public void setStickySessionID​(java.util.function.Supplier<java.lang.String> stickyIDProvider)
            Description copied from interface: FileTransferMechanism
            Sets the current supplier that is used to generate the unique sticky session identifier that the FileCatalyst Client use when the connect to the FileCatalyst LoadBalancer
            Specified by:
            setStickySessionID in interface FileTransferMechanism