class CopyTransfer extends Transfer {

    @Override
    public TransferAction action(final Session<?> source, final Session<?> destination, boolean resumeRequested, boolean reloadRequested,
                                 final TransferPrompt prompt, final ListProgressListener listener) throws BackgroundException {
        if(log.isDebugEnabled()) {
            log.debug(String.format("Find transfer action for Resume=%s,Reload=%s", resumeRequested, reloadRequested));
        }
        if(resumeRequested) {
            return TransferAction.comparison;
        }
        final TransferAction action;
        if(reloadRequested) {
            action = TransferAction.forName(
                PreferencesFactory.get().getProperty("queue.copy.reload.action"));
        }
        else {
            // Use default
            action = TransferAction.forName(
                PreferencesFactory.get().getProperty("queue.copy.action"));
        }
        if(action.equals(TransferAction.callback)) {
            for(TransferItem upload : roots) {
                final Upload write = destination.getFeature(Upload.class);
                final Path copy = mapping.get(upload.remote);
                final Write.Append append = write.append(copy, upload.remote.attributes().getSize(), PathCache.empty());
                if(append.override || append.append) {
                    // Found remote file
                    if(upload.remote.isDirectory()) {
                        // List files in target directory
                        if(this.list(destination, copy, null, listener).isEmpty()) {
                            // Do not prompt for existing empty directories
                            continue;
                        }
                    }
                    // Prompt user to choose a filter
                    return prompt.prompt(upload);
                }
            }
            // No files exist yet therefore it is most straightforward to use the overwrite action
            return TransferAction.overwrite;
        }
        return action;
    }

    public  CopyTransfer(final Host source, final Host destination,
                        final Map<Path, Path> selected);
    public  CopyTransfer(final Host source, final Host destination,
                        final Map<Path, Path> selected, final BandwidthThrottle bandwidth);

}