public UploadTransfer(final Host host, final List<TransferItem> roots, final Filter<Local> f, final Comparator<Local> comparator) { super(host, roots, new BandwidthThrottle(PreferencesFactory.get().getFloat("queue.upload.bandwidth.bytes"))); this.filter = f; this.comparator = comparator; }
public CopyTransfer(final Host source, final Host destination, final Map<Path, Path> selected) { this(source, destination, selected, new BandwidthThrottle(PreferencesFactory.get().getFloat("queue.download.bandwidth.bytes"))); }
public SyncTransfer(final Host host, final TransferItem item, final TransferAction action) { super(host, Collections.singletonList(item), new BandwidthThrottle(PreferencesFactory.get().getFloat("queue.upload.bandwidth.bytes"))); this.init(); this.item = item; this.action = action; }
public DownloadTransfer(final Host host, final List<TransferItem> roots, final Filter<Path> f, final Comparator<Path> comparator) { super(host, roots, new BandwidthThrottle(PreferencesFactory.get().getFloat("queue.download.bandwidth.bytes"))); this.filter = f; this.comparator = comparator; this.symlinkResolver = new DownloadSymlinkResolver(roots); }
@Override public Path touch(final Path file, final TransferStatus status) throws BackgroundException { final Local temp = TemporaryFileServiceFactory.get().create(file); LocalTouchFactory.get().touch(temp); try { final T reply = feature.upload(file, temp, new BandwidthThrottle(BandwidthThrottle.UNLIMITED), new DisabledStreamListener(), status, new DisabledConnectionCallback()); if(log.isDebugEnabled()) { log.debug(String.format("Received reply %s for creating file %s", reply, file)); } return new Path(file.getParent(), file.getName(), file.getType(), attributes.find(file)); } finally { temp.delete(); } }