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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getAgent()
Gets the warning's agent name.int
getCode()
Gets the warning's three digit code.getDate()
Gets the warning's date.getText()
Gets the warning's text description.int
hashCode()
toString()
Formats aWarning
header value, according to RFC 2616 14.46.static Warning
Parses 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:
Date
ornull
if not defined
-
toString
Formats aWarning
header 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:
Warning
instance ofnull
if could not be parsed
-