Package org.syncany.plugins.transfer
Class AbstractTransferManager
- java.lang.Object
-
- org.syncany.plugins.transfer.AbstractTransferManager
-
- All Implemented Interfaces:
TransferManager
- Direct Known Subclasses:
LocalTransferManager
public abstract class AbstractTransferManager extends java.lang.Object implements TransferManager
Implements basic functionality of aTransferManagerwhich can be implemented sub-classes.This transfer manager is enhanced with the
TransactionAwareandRetriableannotations, thereby making it reliable.
-
-
Field Summary
Fields Modifier and Type Field Description protected Configconfigprotected TransferSettingssettings
-
Constructor Summary
Constructors Constructor Description AbstractTransferManager(TransferSettings settings, Config config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.io.FilecreateTempFile(java.lang.String name)Creates a temporary file, either using the config (if initialized) or using the global temporary directory.StorageTestResulttest(boolean testCreateTarget)Checks whether the settings given to this transfer manager can be used to create or connect to a remote repository.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.syncany.plugins.transfer.TransferManager
connect, delete, disconnect, download, getRemoteFilePath, init, list, move, testRepoFileExists, testTargetCanCreate, testTargetCanWrite, testTargetExists, upload
-
-
-
-
Field Detail
-
settings
protected TransferSettings settings
-
-
Constructor Detail
-
AbstractTransferManager
public AbstractTransferManager(TransferSettings settings, Config config)
-
-
Method Detail
-
createTempFile
protected java.io.File createTempFile(java.lang.String name) throws java.io.IOException
Creates a temporary file, either using the config (if initialized) or using the global temporary directory.- Throws:
java.io.IOException
-
test
public StorageTestResult test(boolean testCreateTarget)
Checks whether the settings given to this transfer manager can be used to create or connect to a remote repository.Tests if the target exists, if it can be written to and if a repository can be created.
- Specified by:
testin interfaceTransferManager- Parameters:
testCreateTarget- Iftrue, the test will test if the target can be created in case it does not exist. Iffalse, this test will be skipped.- Returns:
- Returns the result of testing the repository.
- See Also:
StorageTestResult
-
-