Class ProtocolStatus

  • All Implemented Interfaces:
    Writable

    public class ProtocolStatus
    extends Object
    implements Writable
    Author:
    Andrzej Bialecki
    • 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
      • 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
      • 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
      • 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
      • 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
    • Constructor Detail

      • ProtocolStatus

        public ProtocolStatus()
      • ProtocolStatus

        public ProtocolStatus​(int code,
                              String[] args)
      • ProtocolStatus

        public ProtocolStatus​(int code,
                              String[] args,
                              long lastModified)
      • ProtocolStatus

        public ProtocolStatus​(int code)
      • ProtocolStatus

        public ProtocolStatus​(int code,
                              long lastModified)
      • ProtocolStatus

        public ProtocolStatus​(int code,
                              Object message)
      • ProtocolStatus

        public ProtocolStatus​(int code,
                              Object message,
                              long lastModified)
      • ProtocolStatus

        public ProtocolStatus​(Throwable t)
    • Method Detail

      • setArgs

        public void setArgs​(String[] args)
      • getArgs

        public String[] getArgs()
      • getCode

        public int getCode()
      • getName

        public 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 String getMessage()
      • setMessage

        public void setMessage​(String msg)
      • getLastModified

        public long getLastModified()
      • setLastModified

        public void setLastModified​(long lastModified)