public void inform(FileDistributionListener listener) {
safeDist.setValue(listener.start(file, safe));
}
});
}
final FileDistributionHandler distributionHandler = fileDistribution.getHandler();
// When cancel is called.. stop processing.
int fileCount = 0;
while (!cancel) {
try {
final FileDistributionHandler.Result result = distributionHandler.sendNextFile();
fileCount++;
if (result == null) {
break;
}
if (listener != null) {