| javax.sip.header.AcceptLanguageHeader
AcceptLanguageHeader | public interface AcceptLanguageHeader extends Parameters,Header(Code) | | The Accept-Language header field is used in requests to indicate the
preferred languages for reason phrases, session descriptions, or
status responses carried as message bodies in the response. If no
Accept-Language header field is present, the server SHOULD assume all
languages are acceptable to the client. The q-value is used in a similar
manner to AcceptHeader to indicate degrees of preference.
For Example:
Accept-Language: da, en-gb;q=0.8, en;q=0.7
See Also: AcceptHeader author: BEA Systems, NIST version: 1.2 |
Method Summary | |
public Locale | getAcceptLanguage() Gets the language value of the AcceptLanguageHeader. | public float | getQValue() Gets q-value of the media-range in AcceptLanguageHeader. | public void | setAcceptLanguage(Locale language) Sets the language parameter of this AcceptLanguageHeader. | public void | setQValue(float qValue) Sets q-value for media-range in AcceptLanguageHeader. |
NAME | final public static String NAME(Code) | | Name of AcceptLanguageHeader
|
getAcceptLanguage | public Locale getAcceptLanguage()(Code) | | Gets the language value of the AcceptLanguageHeader.
the language Locale value of this AcceptLanguageHeader |
getQValue | public float getQValue()(Code) | | Gets q-value of the media-range in AcceptLanguageHeader. A value of
-1 indicates theq-value is not set.
q-value of media-range, -1 if q-value is not set. |
setAcceptLanguage | public void setAcceptLanguage(Locale language)(Code) | | Sets the language parameter of this AcceptLanguageHeader.
Parameters: language - - the new Locale value of the language ofAcceptLanguageHeader |
setQValue | public void setQValue(float qValue) throws InvalidArgumentException(Code) | | Sets q-value for media-range in AcceptLanguageHeader. Q-values allow the
user to indicate the relative degree of preference for that media-range,
using the qvalue scale from 0 to 1. If no q-value is present, the
media-range should be treated as having a q-value of 1.
Parameters: qValue - - the new float value of the q-value, a value of -1 resetsthe qValue. throws: InvalidArgumentException - if the q parameter value is not-1 or between 0 and 1 . |
|
|