|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.droids.helper.Loggable
org.apache.droids.protocol.http.HttpProtocol
public class HttpProtocol
Protocol handler based on HttpClient 4.0.
| Field Summary |
|---|
| Fields inherited from class org.apache.droids.helper.Loggable |
|---|
log |
| Constructor Summary | |
|---|---|
HttpProtocol()
|
|
HttpProtocol(org.apache.http.client.HttpClient httpclient)
|
|
| Method Summary | |
|---|---|
java.lang.String |
getUserAgent()
|
boolean |
isAllowed(java.net.URI uri)
Some protocols (like http) offer a mechanism to evaluate whether the client can request a given url (in http this is the robots.txt configuration) |
boolean |
isForceAllow()
You can force that a site is allowed (ignoring the robots.txt). |
ManagedContentEntity |
load(java.net.URI uri)
Return the content entity represent of the url |
void |
setForceAllow(boolean forceAllow)
You can force that a site is allowed (ignoring the robot.txt). |
void |
setUserAgent(java.lang.String userAgent)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HttpProtocol(org.apache.http.client.HttpClient httpclient)
public HttpProtocol()
| Method Detail |
|---|
public ManagedContentEntity load(java.net.URI uri)
throws java.io.IOException
Protocol
load in interface Protocoljava.io.IOExceptionpublic boolean isAllowed(java.net.URI uri)
Protocol
isAllowed in interface Protocoluri - the url to evaluate
public java.lang.String getUserAgent()
public void setUserAgent(java.lang.String userAgent)
public boolean isForceAllow()
true if you are rude and ignore robots.txt.
false if you are playing nice.public void setForceAllow(boolean forceAllow)
forceAllow - if you want to force an allow and ignore the robot.txt set
to true. If you want to obey the rules and
be polite set to false.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||