|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--jain.protocol.ip.sip.header.Header
|
+--jain.protocol.ip.sip.header.ResponseHeader
|
+--jain.protocol.ip.sip.header.WarningHeader
This class represents the Warning response-header. WarningHeader is used to carry additional information about the status of a ResponseMessage. WarningHeaders are sent with ResponseMessages and a ResponseMessage may carry more than one WarningHeader.
The text should be in a natural language that is most likely to be intelligible to the human user receiving the ResponseMessage. This decision can be based on any available knowledge, such as the location of the cache or user, the AcceptLanguageHeader in a RequestMessage, or the ContentLanguageHeader in a ResponseMessage.
Any server may add WarningHeaders to a ResponseMessage. Proxy servers must place additional WarningHeaders before any AuthorizationHeaders. Within that constraint, WarningHeaders must be added after any existing WarningHeaders not covered by a signature. A proxy server must not delete any WarningHeader that it received with a ResponseMessage.
When multiple WarningHeaders are attached to a ResponseMessage, the user agent should display as many of them as possible, in the order that they appear in the ResponseMessage. If it is not possible to display all of the warnings, the user agent first displays warnings that appear early in the ResponseMessage.
The warning code consists of three digits. A first digit of "3" indicates warnings specific to SIP (1xx and 2xx have been taken by HTTP/1.1). This is a list of the currently-defined "warn-code"s, each with a recommended warning text in English, and a description of its meaning. Note that these warnings describe failures induced by the session description.
Warning codes 300 through 329 are reserved for indicating problems with keywords in the session description, 330 through 339 are warnings related to basic network services requested in the session description, 370 through 379 are warnings related to quantitative QoS parameters requested in the session description, and 390 through 399 are miscellaneous warnings that do not fall into one of the above categories.
| Field Summary | |
static java.lang.String |
token
Token of WarningHeader |
| Fields inherited from class jain.protocol.ip.sip.header.Header |
ENTITY_HEADER,
GENERAL_HEADER,
REQUEST_HEADER,
RESPONSE_HEADER |
| Constructor Summary | |
WarningHeader(int code,
java.net.InetAddress agentHost,
java.lang.String text)
Creates a WarningHeader based on given code, agent host and text |
|
WarningHeader(int code,
java.lang.String agentPseudonym,
java.lang.String text)
Creates a WarningHeader based on given code, agent pseudonym and text |
|
| Method Summary | |
java.lang.Object |
clone()
Creates and returns a copy of WarningHeader |
boolean |
equals(WarningHeader warningHeader)
Indicates whether some other WarningHeader is "equal to" this one |
java.net.InetAddress |
getAgentHost()
Gets agent host of WarningHeader |
int |
getAgentPort()
Gets agent port of WarningHeader |
java.lang.String |
getAgentPseudonym()
Gets agent pseudonym of WarningHeader |
int |
getCode()
Gets code of WarningHeader |
java.lang.String |
getText()
Gets text of WarningHeader |
java.lang.String |
getValue()
Gets value of WarningHeader |
boolean |
hasAgentHost()
Returns boolean value indicating if WarningHeader has agent host |
boolean |
hasAgentPort()
Returns boolean value indicating if WarningHeader has agent port |
boolean |
hasAgentPseudonym()
Returns boolean value indicating if WarningHeader has agent pseudonym |
void |
removeAgentPort()
Removes agent port from WarningHeader |
void |
setAgentHost(java.net.InetAddress agentHost)
Sets agent host of WarningHeader |
void |
setAgentPort(int agentPort)
Sets agent port of WarningHeader |
void |
setAgentPseudonym(java.lang.String agentPseudonym)
Sets agent pseudonym of WarningHeader |
void |
setCode(int code)
Sets code of WarningHeader |
void |
setText(java.lang.String text)
Sets text of WarningHeader |
| Methods inherited from class jain.protocol.ip.sip.header.Header |
equals,
getHeaderType,
getToken,
setValue,
toString |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public static java.lang.String token
| Constructor Detail |
public WarningHeader(int code,
java.net.InetAddress agentHost,
java.lang.String text)
code - codeagentHost - agent hosttext - text
public WarningHeader(int code,
java.lang.String agentPseudonym,
java.lang.String text)
code - codeagentPseudonym - agent pseudonymtext - text| Method Detail |
public int getCode()
public java.net.InetAddress getAgentHost()
throws ParameterNotSetException
public boolean hasAgentHost()
public int getAgentPort()
throws ParameterNotSetException
public boolean hasAgentPort()
public void removeAgentPort()
public java.lang.String getAgentPseudonym()
throws ParameterNotSetException
public boolean hasAgentPseudonym()
public java.lang.String getText()
public void setCode(int code)
throws java.lang.IllegalArgumentException
code - code
public void setAgentHost(java.net.InetAddress agentHost)
throws java.lang.IllegalArgumentException
agentHost - agent host
public void setAgentPort(int agentPort)
throws java.lang.IllegalArgumentException,
SipException
agentPort - agent port
public void setAgentPseudonym(java.lang.String agentPseudonym)
throws java.lang.IllegalArgumentException
agentPseudonym - agent pseudonym
public void setText(java.lang.String text)
throws java.lang.IllegalArgumentException
text - textpublic java.lang.String getValue()
public java.lang.Object clone()
public boolean equals(WarningHeader warningHeader)
warningHeader - the WarningHeader with which to compare
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright - 2000 Sun Microsystems