Class AbstractHttpProtocol
-
- All Implemented Interfaces:
-
ai.platon.pulsar.common.config.Configurable,ai.platon.pulsar.skeleton.workflow.common.LazyConfigurable,ai.platon.pulsar.skeleton.workflow.protocol.Protocol,java.lang.AutoCloseable
public abstract class AbstractHttpProtocol implements Protocol
-
-
Constructor Summary
Constructors Constructor Description AbstractHttpProtocol()
-
Method Summary
Modifier and Type Method Description final BooleanisActive()ImmutableConfiggetConf()The configuration UnitsetConf(ImmutableConfig conf)The configuration Unitconfigure(ImmutableConfig conf1)Set up the protocol. Unitreset()Reset the protocol environment, so the peer host view the client as a new one ProtocolOutputgetProtocolOutputDeferred(WebPage page)Returns the ProtocolOutput for a fetch list entry. abstract ResponsegetResponseDeferred(WebPage page, Boolean followRedirects)BaseRobotRulesgetRobotRules(WebPage page)Retrieve robot rules applicable for this url. Unitclose()StringtoString()-
-
Method Detail
-
getConf
ImmutableConfig getConf()
The configuration
-
configure
Unit configure(ImmutableConfig conf1)
Set up the protocol. Sometimes the protocol can not to be constructed with parameters, so it need a secondary setup.
-
getProtocolOutputDeferred
ProtocolOutput getProtocolOutputDeferred(WebPage page)
Returns the ProtocolOutput for a fetch list entry.
-
getResponseDeferred
abstract Response getResponseDeferred(WebPage page, Boolean followRedirects)
-
getRobotRules
BaseRobotRules getRobotRules(WebPage page)
Retrieve robot rules applicable for this url.
- Parameters:
page- The Web page- Returns:
robot rules (specific for this url or default), never null
-
-
-
-