* @param listener listener
* @param safe safe mode
*/
public void distributeFiles(ListenerSupport<FileDistributionListener> listener, final boolean safe) {
final FileDistribution fileDistribution = getConsoleComponent(FileDistribution.class);
final AgentCacheState agentCacheState = fileDistribution.getAgentCacheState();
final Condition cacheStateCondition = new Condition();
agentCacheState.addListener(new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent ignored) {
synchronized (cacheStateCondition) {
cacheStateCondition.notifyAll();
}
}