|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.niocchi.core.Query
public class Query
An object that encapsulate an URL to be crawled and the returned crawl status. The default maximum redirections = 5.
Nested Class Summary | |
---|---|
static class |
Query.Method
|
Constructor Summary | |
---|---|
Query()
|
|
Query(Query query_)
|
|
Query(java.lang.String str_)
|
|
Query(java.net.URL url_)
|
Method Summary | |
---|---|
java.lang.String |
getHost()
Returns the host part of the associated URL (returned by getURL()) |
int |
getHTTPStatus()
Returns the HTTP status or _UNKNOWN_HTTP_STATUS if no available status. |
java.net.InetSocketAddress |
getInetSocketAddress()
Returns the InetSocketAddress or null if the query is not resolved. |
static int |
getMaxRedirections()
|
Query.Method |
getMethod()
Returns the method. |
java.net.URL |
getOriginalURL()
Returns the original URL (passed to the constructor). |
java.lang.String |
getPostData()
Returns the data to send through POST. |
int |
getRedirected()
|
Resource |
getResource()
Returns the resource associated to this query. |
QueryStatus |
getStatus()
Returns the query status. |
java.net.URL |
getURL()
Returns the last URL to be crawled (the original URL if no redirection was followed). |
boolean |
hasReachedMaxRedirections()
|
void |
incRedirected()
|
void |
readFields(java.io.DataInput in)
|
static void |
setMaxRedirections(int max_)
|
void |
setMethod(Query.Method _method)
Set the method (GET or POST). |
void |
setPostData(java.lang.String _bodyData)
Set the data to send through POST. |
void |
setStatus(QueryStatus status)
Sets the status of this resource. |
void |
write(java.io.DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Query()
public Query(java.lang.String str_) throws java.net.MalformedURLException
java.net.MalformedURLException
public Query(java.net.URL url_)
public Query(Query query_)
Method Detail |
---|
public int getHTTPStatus()
public QueryStatus getStatus()
public void setStatus(QueryStatus status)
public static int getMaxRedirections()
public static void setMaxRedirections(int max_)
public java.net.InetSocketAddress getInetSocketAddress()
public java.lang.String getHost()
public java.net.URL getURL()
public java.net.URL getOriginalURL()
public Resource getResource()
public void setMethod(Query.Method _method)
_method
- The method.public Query.Method getMethod()
public void setPostData(java.lang.String _bodyData)
_bodyData
- The data.public java.lang.String getPostData()
public int getRedirected()
public void incRedirected()
public boolean hasReachedMaxRedirections()
public void write(java.io.DataOutput out) throws java.io.IOException
java.io.IOException
public void readFields(java.io.DataInput in) throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |