BEAST
eu.baltrad.beast.net.FileDistribution Class Reference

Runnable that executes file distributions. More...

Inheritance diagram for eu.baltrad.beast.net.FileDistribution:

Classes

class  FileDistributionStateContainer
 

Public Member Functions

 FileDistribution (File src, URI destination, String entryName, FileDistributionStateContainer state) throws UnknownServiceException
 
FileUploadHandler getUploadHandler ()
 
void setUploadHandler (FileUploadHandler uploadHandler)
 
URI getFullDestination ()
 
void setFullDestination (URI fullDestination)
 
File getSourceFile ()
 
void setSourceFile (File sourceFile)
 
void run ()
 

Static Public Member Functions

static HashMap< URI, String > getCurrentUploads ()
 
static void setCurrentUploads (HashMap< URI, String > currentUploads)
 

Protected Member Functions

FileUploadHandler getHandlerByScheme (String scheme) throws UnknownServiceException
 
URI appendPath (URI uri, String path)
 Append a path to an URI.
 
boolean lockUpload (File src, URI destination)
 
void unlockUpload (URI destination)
 
void warnAboutOngoingUpload (File src, URI fullDestination)
 
void uploadDone (boolean uploadSuccessful)
 

Detailed Description

Runnable that executes file distributions.

The type of file distribution is determined by the scheme indicated by the destination URI, provided as input to the constructor. Valid schemes are "copy", "ftp", "scp", "scponly", and "sftp".

The class provides protection against parallel uploads toward the same destination. If a distribution is started towards a destination that is already targeted by another active distribution, it will aborted and a warning will be output to the log.

Constructor & Destructor Documentation

◆ FileDistribution()

eu.baltrad.beast.net.FileDistribution.FileDistribution ( File src,
URI destination,
String entryName,
FileDistributionStateContainer state ) throws UnknownServiceException
inline
Parameters
src
destination
entryName
Exceptions
UnknownServiceExceptionthrown if the scheme in the destination URI is invalid/unknown

Member Function Documentation

◆ appendPath()

URI eu.baltrad.beast.net.FileDistribution.appendPath ( URI uri,
String path )
inlineprotected

Append a path to an URI.

Parameters
urithe URI to append to
paththe path to append
Returns
a new URI with the path appended

The documentation for this class was generated from the following file: