package ru.decipher.mock;
import org.apache.log4j.Logger;
import ru.decipher.proxy.HttpProxyConfigLoader;
import ru.decipher.proxy.impl.HttpProxyConfig;
import java.util.Collection;
import java.util.LinkedHashSet;
import java.util.Set;
/**
* User: Alexander Paderin (apocarteres@gmail.com)
* Date: 10/21/13
* Time: 1:44 PM
*/
public class MockIncrementalGoodHttpProxyNoDelayLoader implements HttpProxyConfigLoader {
private static final Logger log = Logger.getLogger(MockIncrementalGoodHttpProxyNoDelayLoader.class);
private final Set<HttpProxyConfig> configs = new LinkedHashSet<HttpProxyConfig>() {{
add(new HttpProxyConfig("test1.host", 31337));
add(new HttpProxyConfig("test2.host", 31337));
}};
@Override
public Collection<HttpProxyConfig> load() throws Exception {
configs.add(new HttpProxyConfig("test" + (configs.size() + 1) + ".host", 31337));
log.debug("returned mocked proxy configs on demand");
return configs;
}
}