public interface WarningHeader extends Header
When multiple WarningHeaders are attached to a Response, the user agent should display as many of them as possible, in the order that they appear in the Response. If it is not possible to display all of the warnings, the user agent first displays warnings that appear early in the Response.
Examples of using Warning Headers are as follows:
Warning: 307 isi.edu "Session parameter 'foo' not understood"
Modifier and Type | Field and Description |
---|---|
static int |
ATTRIBUTE_NOT_UNDERSTOOD
One or more of the media attributes in the session description are
not supported.
|
static int |
INCOMPATIBLE_BANDWIDTH_UNITS
One or more bandwidth measurement units contained in the session
description were not understood.
|
static int |
INCOMPATIBLE_MEDIA_FORMAT
One or more media formats contained in the session description are
not available.
|
static int |
INCOMPATIBLE_NETWORK_ADDRESS_FORMATS
One or more network address formats contained in the session
description are not available.
|
static int |
INCOMPATIBLE_NETWORK_PROTOCOL
One or more network protocols contained in the session description
are not available.
|
static int |
INCOMPATIBLE_TRANSPORT_PROTOCOL
One or more transport protocols described in the session description
are not available.
|
static int |
INSUFFICIENT_BANDWIDTH
The bandwidth specified in the session description or defined by the
media exceeds that known to be available.
|
static int |
MEDIA_TYPE_NOT_AVAILABLE
One or more media types contained in the session description are
not available.
|
static int |
MISCELLANEOUS_WARNING
The warning text can include arbitrary information to be presented to
a human user, or logged.
|
static int |
MULTICAST_NOT_AVAILABLE
The site where the user is located does not support multicast.
|
static String |
NAME
Name of WarningHeader
|
static int |
SESSION_DESCRIPTION_PARAMETER_NOT_UNDERSTOOD
A parameter other than those listed above was not understood.
|
static int |
UNICAST_NOT_AVAILABLE
The site where the user is located does not support unicast
communication (usually due to the presence of a firewall).
|
Modifier and Type | Method and Description |
---|---|
String |
getAgent()
Gets the agent of the server that created this WarningHeader.
|
int |
getCode()
Gets the code of the WarningHeader.
|
String |
getText()
Gets text of WarningHeader.
|
void |
setAgent(String agent)
Sets the agent value of the WarningHeader to the new value passed to the
method.
|
void |
setCode(int code)
Sets the code of the WarningHeader.
|
void |
setText(String text)
Sets the text of WarningHeader to the newly supplied text value.
|
static final String NAME
static final int INCOMPATIBLE_NETWORK_PROTOCOL
static final int INCOMPATIBLE_NETWORK_ADDRESS_FORMATS
static final int INCOMPATIBLE_TRANSPORT_PROTOCOL
static final int INCOMPATIBLE_BANDWIDTH_UNITS
static final int MEDIA_TYPE_NOT_AVAILABLE
static final int INCOMPATIBLE_MEDIA_FORMAT
static final int ATTRIBUTE_NOT_UNDERSTOOD
static final int SESSION_DESCRIPTION_PARAMETER_NOT_UNDERSTOOD
static final int MULTICAST_NOT_AVAILABLE
static final int UNICAST_NOT_AVAILABLE
static final int INSUFFICIENT_BANDWIDTH
static final int MISCELLANEOUS_WARNING
String getAgent()
void setAgent(String agent) throws ParseException
agent
- - the new agent value of WarningHeaderParseException
- which signals that an error has been reached
unexpectedly while parsing the agent value.String getText()
void setText(String text) throws ParseException
text
- - the new text value of the Warning Header.ParseException
- which signals that an error has been reached
unexpectedly while parsing the text value.void setCode(int code) throws InvalidArgumentException
code
- - the new code that defines the warning code.InvalidArgumentException
- if an invalid integer code is given for
the WarningHeader.int getCode()
Copyright © 2014. All Rights Reserved.