com.geccocrawler.gecco.spider.render.MonitorRenderFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gecco Show documentation
Show all versions of gecco Show documentation
Easy to use lightweight web crawler
package com.geccocrawler.gecco.spider.render;
import org.reflections.Reflections;
import net.sf.cglib.proxy.Enhancer;
import com.geccocrawler.gecco.monitor.RenderMointorIntercetor;
import com.geccocrawler.gecco.spider.render.html.HtmlRender;
import com.geccocrawler.gecco.spider.render.json.JsonRender;
public class MonitorRenderFactory extends RenderFactory {
public MonitorRenderFactory(Reflections reflections) {
super(reflections);
}
@Override
public HtmlRender createHtmlRender() {
Enhancer enhancer = new Enhancer();
enhancer.setSuperclass(HtmlRender.class);
enhancer.setCallback(new RenderMointorIntercetor());
return (HtmlRender)enhancer.create();
}
@Override
public JsonRender createJsonRender() {
Enhancer enhancer = new Enhancer();
enhancer.setSuperclass(JsonRender.class);
enhancer.setCallback(new RenderMointorIntercetor());
return (JsonRender)enhancer.create();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy