Package org.forgerock.http.header
Class Warning
java.lang.Object
org.forgerock.http.header.Warning
WarningHeader entry. This class is immutable and thread-safe.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetAgent()Gets the warning's agent name.intgetCode()Gets the warning's three digit code.getDate()Gets the warning's date.getText()Gets the warning's text description.inthashCode()toString()Formats aWarningheader value, according to RFC 2616 14.46.static WarningParses a warning-header value (part afterWarning:).
-
Constructor Details
-
Warning
Creates a new instance without optional date.- Parameters:
code- Three digit codeagent- Name orhost[:port]of the server adding the headertext- Text
-
Warning
Creates a new instance with optional date.- Parameters:
code- Three digit codeagent- Name orhost[:port]of the server adding the headertext- Text (unquoted)date- Date ornull
-
-
Method Details
-
getCode
public int getCode()Gets the warning's three digit code.- Returns:
- Three digit code
-
getAgent
Gets the warning's agent name.- Returns:
- Name or
host[:port]of the server adding the header
-
getText
Gets the warning's text description.- Returns:
- Text
-
getDate
Gets the warning's date.- Returns:
Dateornullif not defined
-
toString
Formats aWarningheader value, according to RFC 2616 14.46. -
equals
-
hashCode
public int hashCode() -
valueOf
Parses a warning-header value (part afterWarning:).- Parameters:
value- Warning-header value- Returns:
Warninginstance ofnullif could not be parsed
-