org.apache.nutch.fetcher

## Class FetchItem

- java.lang.Object
- - org.apache.nutch.fetcher.FetchItem

-     public class FetchItem
      extends Object

  This class describes the item to be fetched.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FetchItem(Text url, URL u, CrawlDatum datum, String queueID)`
    `FetchItem(Text url, URL u, CrawlDatum datum, String queueID, int outlinkDepth)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static FetchItem` | `create(Text url, CrawlDatum datum, String queueMode)` Create an item.
    `static FetchItem` | `create(Text url, CrawlDatum datum, String queueMode, int outlinkDepth)`
    `CrawlDatum` | `getDatum()`
    `String` | `getQueueID()`
    `Text` | `getUrl()`
    `URL` | `getURL2()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FetchItem

          public FetchItem(Text url,
                           URL u,
                           CrawlDatum datum,
                           String queueID)

    - #### FetchItem

          public FetchItem(Text url,
                           URL u,
                           CrawlDatum datum,
                           String queueID,
                           int outlinkDepth)

  - ### Method Detail

    - #### create

          public static FetchItem create(Text url,
                                         CrawlDatum datum,
                                         String queueMode)

      Create an item. Queue id will be created based on `queueMode` argument, either as a protocol + hostname pair, protocol + IP address pair or protocol+domain pair.

    - #### create

          public static FetchItem create(Text url,
                                         CrawlDatum datum,
                                         String queueMode,
                                         int outlinkDepth)

    - #### getDatum

          public CrawlDatum getDatum()

    - #### getQueueID

          public String getQueueID()

    - #### getUrl

          public Text getUrl()

    - #### getURL2

          public URL getURL2()

Copyright © 2021 The Apache Software Foundation