Class AMQPCrawlLogFeed
java.lang.Object
org.archive.modules.Processor
org.archive.modules.AMQPProducerProcessor
org.archive.modules.postprocessor.AMQPCrawlLogFeed
- All Implemented Interfaces:
org.archive.checkpointing.Checkpointable
,org.archive.spring.HasKeyedProperties
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanNameAware
,org.springframework.context.Lifecycle
public class AMQPCrawlLogFeed
extends AMQPProducerProcessor
implements org.springframework.context.Lifecycle
- Author:
- nlevitt
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected Frontier
protected com.rabbitmq.client.AMQP.BasicProperties
protected ServerCache
Fields inherited from class org.archive.modules.AMQPProducerProcessor
amqpProducer, logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.rabbitmq.client.AMQP.BasicProperties
protected byte[]
buildMessage
(CrawlURI curi) boolean
void
setDumpPendingAtClose
(boolean dumpPendingAtClose) If true, publish all pending urls (i.e. queued urls still in the frontier) when crawl job is stopping.void
setExtraFields
(Map<String, String> extraFields) void
setFrontier
(Frontier frontier) Autowired frontier, needed to determine when a url is finished.void
setServerCache
(ServerCache serverCache) protected boolean
shouldProcess
(CrawlURI curi) void
stop()
Methods inherited from class org.archive.modules.AMQPProducerProcessor
amqpProducer, fail, getAmqpUri, getExchange, getRoutingKey, innerProcess, innerProcessResult, setAmqpUri, setExchange, setRoutingKey, success
Methods inherited from class org.archive.modules.Processor
doCheckpoint, finishCheckpoint, flattenVia, fromCheckpointJson, getBeanName, getEnabled, getKeyedProperties, getRecordedSize, getShouldProcessRule, getURICount, hasHttpAuthenticationCredential, innerRejectProcess, isRunning, isSuccess, process, report, setBeanName, setEnabled, setRecoveryCheckpoint, setShouldProcessRule, start, startCheckpoint, toCheckpointJson
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.context.Lifecycle
isRunning, start
-
Field Details
-
frontier
-
serverCache
-
extraFields
-
dumpPendingAtClose
protected boolean dumpPendingAtClose -
props
protected com.rabbitmq.client.AMQP.BasicProperties props
-
-
Constructor Details
-
AMQPCrawlLogFeed
public AMQPCrawlLogFeed()
-
-
Method Details
-
getFrontier
-
setFrontier
Autowired frontier, needed to determine when a url is finished. -
getServerCache
-
setServerCache
-
getExtraFields
-
setExtraFields
-
getDumpPendingAtClose
public boolean getDumpPendingAtClose() -
setDumpPendingAtClose
public void setDumpPendingAtClose(boolean dumpPendingAtClose) If true, publish all pending urls (i.e. queued urls still in the frontier) when crawl job is stopping. They are recognizable by the status field which has the value 0. -
buildMessage
- Specified by:
buildMessage
in classAMQPProducerProcessor
-
shouldProcess
- Specified by:
shouldProcess
in classProcessor
-
stop
public void stop()- Specified by:
stop
in interfaceorg.springframework.context.Lifecycle
- Overrides:
stop
in classAMQPProducerProcessor
-
amqpMessageProperties
protected com.rabbitmq.client.AMQP.BasicProperties amqpMessageProperties()- Overrides:
amqpMessageProperties
in classAMQPProducerProcessor
-