Class Priority


  • public class Priority
    extends java.lang.Object
    HTTP priority header parser as per RFC 9218.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static boolean DEFAULT_INCREMENTAL
      Default incremental flag value as per RFC 9218.
      static int DEFAULT_URGENCY
      Default urgency value as per RFC 9218.
    • Constructor Summary

      Constructors 
      Constructor Description
      Priority()
      Creates a new Priority instance with default values as per RFC 9218.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean getIncremental()
      Returns the incremental flag.
      int getUrgency()
      Returns the urgency value.
      static Priority parsePriority​(java.io.Reader input)
      Parsers an HTTP header as a Priority header as defined by RFC 9218.
      void setIncremental​(boolean incremental)
      Sets the incremental flag.
      void setUrgency​(int urgency)
      Sets the urgency value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_URGENCY

        public static final int DEFAULT_URGENCY
        Default urgency value as per RFC 9218.
        See Also:
        Constant Field Values
      • DEFAULT_INCREMENTAL

        public static final boolean DEFAULT_INCREMENTAL
        Default incremental flag value as per RFC 9218.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Priority

        public Priority()
        Creates a new Priority instance with default values as per RFC 9218.
    • Method Detail

      • getUrgency

        public int getUrgency()
        Returns the urgency value.
        Returns:
        the urgency value
      • setUrgency

        public void setUrgency​(int urgency)
        Sets the urgency value.
        Parameters:
        urgency - the urgency value
      • getIncremental

        public boolean getIncremental()
        Returns the incremental flag.
        Returns:
        the incremental flag
      • setIncremental

        public void setIncremental​(boolean incremental)
        Sets the incremental flag.
        Parameters:
        incremental - the incremental flag
      • parsePriority

        public static Priority parsePriority​(java.io.Reader input)
                                      throws java.io.IOException
        Parsers an HTTP header as a Priority header as defined by RFC 9218.
        Parameters:
        input - The header to parse
        Returns:
        The resulting priority
        Throws:
        java.io.IOException - If an I/O error occurs while reading the input