.
This commit is contained in:
parent
10a286d71d
commit
044edefa12
@ -8,31 +8,32 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
public abstract class Crawler {
|
public abstract class Crawler {
|
||||||
|
|
||||||
public Object add(String id) throws Exception {
|
private Map<String,Map<String,Object>> configs;
|
||||||
|
|
||||||
|
public Object add(String id) throws Exception {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object get(String id) throws Exception {
|
public Object get(String id) throws Exception {
|
||||||
|
|
||||||
return getInternal(getConfig(id));
|
return getInternal(getConfig(id));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract Object getInternal(Map<String, Object> params) throws Exception;
|
protected abstract Object getInternal(Map<String, Object> params) throws Exception;
|
||||||
|
|
||||||
public Map<String,Object> getConfig(String id) throws Exception {
|
public Map<String,Object> getConfig(String id) throws Exception {
|
||||||
|
return configs.get(id);
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object init(String config) throws Exception {
|
public void putConfig(String id,Map<String,Object> o) throws Exception {
|
||||||
|
configs.put(id,o);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Object init(String config) throws Exception {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object remove(String id) throws Exception {
|
public Object remove(String id) throws Exception {
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user