| java.lang.Object net.matuschek.spider.RobotTask
RobotTask | public class RobotTask implements Comparable(Code) | | The RobotTask implements a simple object that represents a task
for the web robot.
author: Daniel Matuschek version: $Id: RobotTask.java,v 1.7 2003/02/25 13:34:48 oliver_schmidt Exp $ |
hashCode | protected int hashCode(Code) | | |
method | protected int method(Code) | | |
retries | protected int retries(Code) | | |
RobotTask | public RobotTask(URL url, int maxDepth, String referer)(Code) | | Creates a new RobotTask with the given parameters
Parameters: url - - the URL of the RobotTask Parameters: maxDepth - - maximal search depth starting from this task Parameters: referer - - content of the HTTP Referer header, use "-" ifyou don't want to use a Referer |
RobotTask | public RobotTask(String urlString, int maxDepth, String referer)(Code) | | Creates a new RobotTask with the given parameters
Parameters: urlString - - the URL (as String) of the RobotTask Parameters: maxDepth - - maximal search depth starting from this task Parameters: referer - - content of the HTTP Referer header, use "-" ifyou don't want to use a Referer |
compareTo | public int compareTo(Object o) throws ClassCastException(Code) | | Implements a natural order for RobotTasks. This is based
on
Parameters: o - another RobotTask object to compare to 0 if o is equal to this object, 1 if it is smaller,-1 otherwise exception: ClassCastException - if o is no RobotTask object |
equals | public boolean equals(Object o)(Code) | | two RobotTasks are equal, if they represent the
same URL
|
getInternalStringRepresentation | public String getInternalStringRepresentation()(Code) | | Gets an internal String representation for comparisons
and hash code generation.
Currently this contains the url, the parameters and the method.
Because this is only used as an internal key and the URL and
parameters can be very long, I have decided to use the MD5 hash of
the longer representation.
a String that should be unique for every object |
getMaxDepth | public int getMaxDepth()(Code) | | |
getMethod | public int getMethod()(Code) | | |
hashCode | public int hashCode()(Code) | | Gets a hashcode for this object. It is based on the String hash code
implementation used with the internal string representation of this
object
|
setMaxDepth | public void setMaxDepth(int maxDepth)(Code) | | |
setMethod | public void setMethod(int method)(Code) | | |
setParamString | public void setParamString(String paramString)(Code) | | |
toString | public String toString()(Code) | | Gets a String representation for this RobotTask object. Format
may change without notice. Should be used for debugging and logging
only.
a String represantation for this task |
|
|