Package org.syncany.plugins.transfer
Class TransferManagerFactory
- java.lang.Object
-
- org.syncany.plugins.transfer.TransferManagerFactory
-
public class TransferManagerFactory extends java.lang.Object
This factory class creates aTransferManager
from aConfig
object, and wraps it into the requestedFeature
(s).Depending on the
Feature
s that the original transfer manager is annotated with, the factory will wrap it into the corresponding feature specific transfer managers.The class uses the builder pattern. It can be used like this:
TransactionAwareFeatureTransferManager txAwareTM = TransferManagerFactory .build(config) .withFeature(Retriable.class) .withFeature(PathAware.class) .withFeature(TransactionAware.class) .as(TransactionAware.class);
- See Also:
Feature
,FeatureTransferManager
,TransferManager
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TransferManagerFactory.TransferManagerBuilder
The transfer manager builder takes an originalTransferManager
, and wraps it with feature-specific transfer managers, if the original transfer manager is annotated with aFeature
annotation.
-
Constructor Summary
Constructors Constructor Description TransferManagerFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TransferManagerFactory.TransferManagerBuilder
build(Config config)
Creates the transfer manager factory builder from theConfig
using the configuredTransferPlugin
.
-
-
-
Constructor Detail
-
TransferManagerFactory
public TransferManagerFactory()
-
-
Method Detail
-
build
public static TransferManagerFactory.TransferManagerBuilder build(Config config) throws StorageException
Creates the transfer manager factory builder from theConfig
using the configuredTransferPlugin
. Using this builder, the feature-wrapped transfer manager can be built.- Parameters:
config
- Local folder configuration with transfer plugin settings- Returns:
- Transfer manager builder
- Throws:
StorageException
- See Also:
TransferManagerFactory.TransferManagerBuilder
-
-