Class ParseStatus

  • All Implemented Interfaces:
    Writable

    public class ParseStatus
    extends Object
    implements Writable
    Author:
    Andrzej Bialecki <ab@getopt.org>
    • Field Detail

      • NOTPARSED

        public static final byte NOTPARSED
        Parsing was not performed.
        See Also:
        Constant Field Values
      • FAILED

        public static final byte FAILED
        General failure. There may be a more specific error message in arguments.
        See Also:
        Constant Field Values
      • majorCodes

        public static final String[] majorCodes
      • SUCCESS_REDIRECT

        public static final short SUCCESS_REDIRECT
        Parsed content contains a directive to redirect to another URL. The target URL can be retrieved from the arguments.
        See Also:
        Constant Field Values
      • FAILED_EXCEPTION

        public static final short FAILED_EXCEPTION
        Parsing failed. An Exception occured (which may be retrieved from the arguments).
        See Also:
        Constant Field Values
      • FAILED_TRUNCATED

        public static final short FAILED_TRUNCATED
        Parsing failed. Content was truncated, but the parser cannot handle incomplete content.
        See Also:
        Constant Field Values
      • FAILED_INVALID_FORMAT

        public static final short FAILED_INVALID_FORMAT
        Parsing failed. Invalid format - the content may be corrupted or of wrong type.
        See Also:
        Constant Field Values
      • FAILED_MISSING_PARTS

        public static final short FAILED_MISSING_PARTS
        Parsing failed. Other related parts of the content are needed to complete parsing. The list of URLs to missing parts may be provided in arguments. The Fetcher may decide to fetch these parts at once, then put them into Content.metadata, and supply them for re-parsing.
        See Also:
        Constant Field Values
      • FAILED_MISSING_CONTENT

        public static final short FAILED_MISSING_CONTENT
        Parsing failed. There was no content to be parsed - probably caused by errors at protocol stage.
        See Also:
        Constant Field Values
      • STATUS_NOTPARSED

        public static final ParseStatus STATUS_NOTPARSED
      • STATUS_SUCCESS

        public static final ParseStatus STATUS_SUCCESS
      • STATUS_FAILURE

        public static final ParseStatus STATUS_FAILURE
    • Constructor Detail

      • ParseStatus

        public ParseStatus()
      • ParseStatus

        public ParseStatus​(int majorCode,
                           int minorCode,
                           String[] args)
      • ParseStatus

        public ParseStatus​(int majorCode)
      • ParseStatus

        public ParseStatus​(int majorCode,
                           String[] args)
      • ParseStatus

        public ParseStatus​(int majorCode,
                           int minorCode)
      • ParseStatus

        public ParseStatus​(int majorCode,
                           String message)
        Simplified constructor for passing just a text message.
        Parameters:
        majorCode - one of NOTPARSED, SUCCESS or FAILED
        message - a message string to accompany the parse codes
      • ParseStatus

        public ParseStatus​(Throwable t)