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 aTransferManagerfrom aConfigobject, and wraps it into the requestedFeature(s).Depending on the
Features 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 classTransferManagerFactory.TransferManagerBuilderThe transfer manager builder takes an originalTransferManager, and wraps it with feature-specific transfer managers, if the original transfer manager is annotated with aFeatureannotation.
-
Constructor Summary
Constructors Constructor Description TransferManagerFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TransferManagerFactory.TransferManagerBuilderbuild(Config config)Creates the transfer manager factory builder from theConfigusing 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 theConfigusing 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
-
-