A retriever of url content. Implemented by protocol extensions.
| 27 | |
| 28 | /** A retriever of url content. Implemented by protocol extensions. */ |
| 29 | public interface Protocol extends FieldPluggable, Configurable { |
| 30 | /** The name of the extension point. */ |
| 31 | public final static String X_POINT_ID = Protocol.class.getName(); |
| 32 | |
| 33 | /** |
| 34 | * Property name. If in the current configuration this property is set to |
| 35 | * true, protocol implementations should handle "politeness" limits |
| 36 | * internally. If this is set to false, it is assumed that these limits are |
| 37 | * enforced elsewhere, and protocol implementations should not enforce them |
| 38 | * internally. |
| 39 | */ |
| 40 | public final static String CHECK_BLOCKING = "protocol.plugin.check.blocking"; |
| 41 | |
| 42 | /** |
| 43 | * Property name. If in the current configuration this property is set to |
| 44 | * true, protocol implementations should handle robot exclusion rules |
| 45 | * internally. If this is set to false, it is assumed that these limits are |
| 46 | * enforced elsewhere, and protocol implementations should not enforce them |
| 47 | * internally. |
| 48 | */ |
| 49 | public final static String CHECK_ROBOTS = "protocol.plugin.check.robots"; |
| 50 | |
| 51 | /* |
| 52 | * Returns the {@link Content} for a fetchlist entry. |
| 53 | */ |
| 54 | ProtocolOutput getProtocolOutput(String url, WebPage page); |
| 55 | |
| 56 | /** |
| 57 | * Retrieve robot rules applicable for this url. |
| 58 | * |
| 59 | * @param url |
| 60 | * url to check |
| 61 | * @param page |
| 62 | * @return robot rules (specific for this url or default), never null |
| 63 | */ |
| 64 | BaseRobotRules getRobotRules(String url, WebPage page); |
| 65 | } |
no test coverage detected