Java网络爬虫crawler4j学习笔记<18> Configurable类

来源:互联网 发布:维氏刀具在淘宝上买 编辑:程序博客网 时间:2024/06/05 19:45

简介

Configurable抽象类包含了一个爬虫配置信息对象config,爬虫其他的功能模块有可能需要用到这些配置信息。

源代码

package edu.uci.ics.crawler4j.crawler;/** * Several core components of crawler4j extend this class * to make them configurable. * * @author Yasser Ganjisaffar [lastname at gmail dot com] */// 爬虫配置的抽象类,其他的一些类需要使用到这些配置public abstract class Configurable {  protected CrawlConfig config;  protected Configurable(CrawlConfig config) {    this.config = config;  }  public CrawlConfig getConfig() {    return config;  }}
0 0
原创粉丝点击