org.apache.nutch.protocol

## Class ProtocolStatus

- java.lang.Object
- - org.apache.nutch.protocol.ProtocolStatus

- All Implemented Interfaces:
    Writable

      public class ProtocolStatus
      extends java.lang.Object
      implements Writable

  Author:
    Andrzej Bialecki

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `ACCESS_DENIED` Access denied - authorization required, but missing/incorrect.
    `static int` | `BLOCKED` Deprecated.
    `static int` | `EXCEPTION` Unspecified exception occurred.
    `static int` | `FAILED` Content was not retrieved.
    `static int` | `GONE` Resource is gone.
    `static int` | `MOVED` Resource has moved permanently.
    `static int` | `NOTFETCHING` Not fetching.
    `static int` | `NOTFOUND` Resource was not found.
    `static int` | `NOTMODIFIED` Unchanged since the last fetch.
    `static int` | `PROTO_NOT_FOUND` This protocol was not found.
    `static int` | `REDIR_EXCEEDED` Too many redirects.
    `static int` | `RETRY` Temporary failure.
    `static int` | `ROBOTS_DENIED` Access denied by robots.txt rules.
    `static ProtocolStatus` | `STATUS_BLOCKED`
    `static ProtocolStatus` | `STATUS_FAILED`
    `static ProtocolStatus` | `STATUS_GONE`
    `static ProtocolStatus` | `STATUS_NOTFETCHING`
    `static ProtocolStatus` | `STATUS_NOTFOUND`
    `static ProtocolStatus` | `STATUS_NOTMODIFIED`
    `static ProtocolStatus` | `STATUS_REDIR_EXCEEDED`
    `static ProtocolStatus` | `STATUS_RETRY`
    `static ProtocolStatus` | `STATUS_ROBOTS_DENIED`
    `static ProtocolStatus` | `STATUS_SUCCESS`
    `static ProtocolStatus` | `STATUS_WOULDBLOCK`
    `static int` | `SUCCESS` Content was retrieved without errors.
    `static int` | `TEMP_MOVED` Resource has moved temporarily.
    `static int` | `WOULDBLOCK` Deprecated.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProtocolStatus()`
    `ProtocolStatus(int code)`
    `ProtocolStatus(int code, long lastModified)`
    `ProtocolStatus(int code, java.lang.Object message)`
    `ProtocolStatus(int code, java.lang.Object message, long lastModified)`
    `ProtocolStatus(int code, java.lang.String[] args)`
    `ProtocolStatus(int code, java.lang.String[] args, long lastModified)`
    `ProtocolStatus(java.lang.Throwable t)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object o)`
    `java.lang.String[]` | `getArgs()`
    `int` | `getCode()`
    `long` | `getLastModified()`
    `java.lang.String` | `getMessage()`
    `java.lang.String` | `getName()`
    `boolean` | `isPermanentFailure()`
    `boolean` | `isRedirect()`
    `boolean` | `isSuccess()`
    `boolean` | `isTransientFailure()`
    `static ProtocolStatus` | `read(java.io.DataInput in)`
    `void` | `readFields(java.io.DataInput in)`
    `void` | `setArgs(java.lang.String[] args)`
    `void` | `setCode(int code)`
    `void` | `setLastModified(long lastModified)`
    `void` | `setMessage(java.lang.String msg)`
    `java.lang.String` | `toString()`
    `void` | `write(java.io.DataOutput out)`

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

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

- - ### Field Detail

    - #### SUCCESS

          public static final int SUCCESS

      Content was retrieved without errors.
      See Also:
        Constant Field Values

    - #### FAILED

          public static final int FAILED

      Content was not retrieved. Any further errors may be indicated in args.
      See Also:
        Constant Field Values

    - #### PROTO_NOT_FOUND

          public static final int PROTO_NOT_FOUND

      This protocol was not found. Application may attempt to retry later.
      See Also:
        Constant Field Values

    - #### GONE

          public static final int GONE

      Resource is gone.
      See Also:
        Constant Field Values

    - #### MOVED

          public static final int MOVED

      Resource has moved permanently. New url should be found in args.
      See Also:
        Constant Field Values

    - #### TEMP_MOVED

          public static final int TEMP_MOVED

      Resource has moved temporarily. New url should be found in args.
      See Also:
        Constant Field Values

    - #### NOTFOUND

          public static final int NOTFOUND

      Resource was not found.
      See Also:
        Constant Field Values

    - #### RETRY

          public static final int RETRY

      Temporary failure. Application may retry immediately.
      See Also:
        Constant Field Values

    - #### EXCEPTION

          public static final int EXCEPTION

      Unspecified exception occurred. Further information may be provided in args.
      See Also:
        Constant Field Values

    - #### ACCESS_DENIED

          public static final int ACCESS_DENIED

      Access denied - authorization required, but missing/incorrect.
      See Also:
        Constant Field Values

    - #### ROBOTS_DENIED

          public static final int ROBOTS_DENIED

      Access denied by robots.txt rules.
      See Also:
        Constant Field Values

    - #### REDIR_EXCEEDED

          public static final int REDIR_EXCEEDED

      Too many redirects.
      See Also:
        Constant Field Values

    - #### NOTFETCHING

          public static final int NOTFETCHING

      Not fetching.
      See Also:
        Constant Field Values

    - #### NOTMODIFIED

          public static final int NOTMODIFIED

      Unchanged since the last fetch.
      See Also:
        Constant Field Values

    - #### WOULDBLOCK

          @Deprecated
          public static final int WOULDBLOCK

      Deprecated.
      Request was refused by protocol plugins, because it would block. The expected number of milliseconds to wait before retry may be provided in args.
      See Also:
        Constant Field Values

    - #### BLOCKED

          @Deprecated
          public static final int BLOCKED

      Deprecated.
      Thread was blocked http.max.delays times during fetching.
      See Also:
        Constant Field Values

    - #### STATUS_SUCCESS

          public static final ProtocolStatus STATUS_SUCCESS

    - #### STATUS_FAILED

          public static final ProtocolStatus STATUS_FAILED

    - #### STATUS_GONE

          public static final ProtocolStatus STATUS_GONE

    - #### STATUS_NOTFOUND

          public static final ProtocolStatus STATUS_NOTFOUND

    - #### STATUS_RETRY

          public static final ProtocolStatus STATUS_RETRY

    - #### STATUS_ROBOTS_DENIED

          public static final ProtocolStatus STATUS_ROBOTS_DENIED

    - #### STATUS_REDIR_EXCEEDED

          public static final ProtocolStatus STATUS_REDIR_EXCEEDED

    - #### STATUS_NOTFETCHING

          public static final ProtocolStatus STATUS_NOTFETCHING

    - #### STATUS_NOTMODIFIED

          public static final ProtocolStatus STATUS_NOTMODIFIED

    - #### STATUS_WOULDBLOCK

          public static final ProtocolStatus STATUS_WOULDBLOCK

    - #### STATUS_BLOCKED

          public static final ProtocolStatus STATUS_BLOCKED

  - ### Constructor Detail

    - #### ProtocolStatus

          public ProtocolStatus()

    - #### ProtocolStatus

          public ProtocolStatus(int code,
                                java.lang.String[] args)

    - #### ProtocolStatus

          public ProtocolStatus(int code,
                                java.lang.String[] args,
                                long lastModified)

    - #### ProtocolStatus

          public ProtocolStatus(int code)

    - #### ProtocolStatus

          public ProtocolStatus(int code,
                                long lastModified)

    - #### ProtocolStatus

          public ProtocolStatus(int code,
                                java.lang.Object message)

    - #### ProtocolStatus

          public ProtocolStatus(int code,
                                java.lang.Object message,
                                long lastModified)

    - #### ProtocolStatus

          public ProtocolStatus(java.lang.Throwable t)

  - ### Method Detail

    - #### read

          public static ProtocolStatus read(java.io.DataInput in)
                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### readFields

          public void readFields(java.io.DataInput in)
                          throws java.io.IOException

      Specified by:
        `readFields` in interface `Writable`
      Throws:
        `java.io.IOException`

    - #### write

          public void write(java.io.DataOutput out)
                     throws java.io.IOException

      Specified by:
        `write` in interface `Writable`
      Throws:
        `java.io.IOException`

    - #### setArgs

          public void setArgs(java.lang.String[] args)

    - #### getArgs

          public java.lang.String[] getArgs()

    - #### getCode

          public int getCode()

    - #### getName

          public java.lang.String getName()

    - #### setCode

          public void setCode(int code)

    - #### isSuccess

          public boolean isSuccess()

    - #### isTransientFailure

          public boolean isTransientFailure()

    - #### isPermanentFailure

          public boolean isPermanentFailure()

    - #### isRedirect

          public boolean isRedirect()

    - #### getMessage

          public java.lang.String getMessage()

    - #### setMessage

          public void setMessage(java.lang.String msg)

    - #### getLastModified

          public long getLastModified()

    - #### setLastModified

          public void setLastModified(long lastModified)

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © 2019 The Apache Software Foundation