Class 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 Details

    • frontier

      protected Frontier frontier
    • serverCache

      protected ServerCache serverCache
    • extraFields

      protected Map<String,String> extraFields
    • dumpPendingAtClose

      protected boolean dumpPendingAtClose
    • props

      protected com.rabbitmq.client.AMQP.BasicProperties props
  • Constructor Details

    • AMQPCrawlLogFeed

      public AMQPCrawlLogFeed()
  • Method Details

    • getFrontier

      public Frontier getFrontier()
    • setFrontier

      @Autowired public void setFrontier(Frontier frontier)
      Autowired frontier, needed to determine when a url is finished.
    • getServerCache

      public ServerCache getServerCache()
    • setServerCache

      @Autowired public void setServerCache(ServerCache serverCache)
    • getExtraFields

      public Map<String,String> getExtraFields()
    • setExtraFields

      public void setExtraFields(Map<String,String> extraFields)
    • 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.
      See Also:
    • buildMessage

      protected byte[] buildMessage(CrawlURI curi)
      Specified by:
      buildMessage in class AMQPProducerProcessor
    • shouldProcess

      protected boolean shouldProcess(CrawlURI curi)
      Specified by:
      shouldProcess in class Processor
    • stop

      public void stop()
      Specified by:
      stop in interface org.springframework.context.Lifecycle
      Overrides:
      stop in class AMQPProducerProcessor
    • amqpMessageProperties

      protected com.rabbitmq.client.AMQP.BasicProperties amqpMessageProperties()
      Overrides:
      amqpMessageProperties in class AMQPProducerProcessor