Class Priority
java.lang.Object
org.apache.tomcat.util.http.parser.Priority
HTTP priority header parser as per RFC 9218.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanDefault incremental flag value as per RFC 9218.static final intDefault urgency value as per RFC 9218. -
Constructor Summary
ConstructorsConstructorDescriptionPriority()Creates a new Priority instance with default values as per RFC 9218. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the incremental flag.intReturns the urgency value.static PriorityparsePriority(Reader input) Parsers an HTTP header as a Priority header as defined by RFC 9218.voidsetIncremental(boolean incremental) Sets the incremental flag.voidsetUrgency(int urgency) Sets the urgency value.
-
Field Details
-
DEFAULT_URGENCY
public static final int DEFAULT_URGENCYDefault urgency value as per RFC 9218.- See Also:
-
DEFAULT_INCREMENTAL
public static final boolean DEFAULT_INCREMENTALDefault incremental flag value as per RFC 9218.- See Also:
-
-
Constructor Details
-
Priority
public Priority()Creates a new Priority instance with default values as per RFC 9218.
-
-
Method Details
-
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
Parsers an HTTP header as a Priority header as defined by RFC 9218.- Parameters:
input- The header to parse- Returns:
- The resulting priority
- Throws:
IOException- If an I/O error occurs while reading the input
-