us.codecraft.webmagic.pipeline.CollectorPageModelPipeline Maven / Gradle / Ivy
package us.codecraft.webmagic.pipeline;
import us.codecraft.webmagic.Task;
import java.util.ArrayList;
import java.util.List;
/**
* @author [email protected]
*/
public class CollectorPageModelPipeline implements PageModelPipeline {
private List collected = new ArrayList();
@Override
public synchronized void process(T t, Task task) {
collected.add(t);
}
public List getCollected() {
return collected;
}
}