class DownloaderFactory {
	
	public static final String DEFAULT_DOWNLOADER = "httpClientDownloader";
	
	private Map<String, Downloader> downloaders;
	
	public DownloaderFactory(Reflections reflections) {
		this.downloaders = new HashMap<String, Downloader>();
		Set<Class<?>> classes = reflections.getTypesAnnotatedWith(com.geccocrawler.gecco.annotation.Downloader.class);
		for(Class<?> downloaderClass : classes) {
			com.geccocrawler.gecco.annotation.Downloader downloader = (com.geccocrawler.gecco.annotation.Downloader)downloaderClass.getAnnotation(com.geccocrawler.gecco.annotation.Downloader.class);
			try {
				Object o = createDownloader(downloaderClass);
				if(o instanceof Downloader) {
					Downloader downloaderInstance = (Downloader)o;
					String name = downloader.value();
					downloaders.put(name, downloaderInstance);
				}
			} catch(Exception ex) {
				ex.printStackTrace();
			}
		}
	}
	
	public Downloader getDownloader(String name) {<FILL_FUNCTION_BODY>}
	
	public Downloader defaultDownloader() {
		return downloaders.get(DEFAULT_DOWNLOADER);
	}

	protected abstract Object createDownloader(Class<?> downloaderClass) throws Exception;
	
	public void closeAll() {
		for(Downloader downloader : downloaders.values()) {
			downloader.shutdown();
		}
	}
}

		Downloader downloader = downloaders.get(name);
		if(downloader == null) {
			return defaultDownloader();
		}
		return downloader;
	
<no_super_class>