|
JAIN SIP API v1.1 - 23rd June 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface represents an Accept request-header. It can be used in to specify media-ranges which are acceptable for the response. AcceptHeaders can be used to indicate that the request is specifically limited to a small set of desired types. The specification of the acceptable media is split into type and subtype.
An AcceptHeader may be followed by one or more parameters applicable to the media-range. 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.)
If no AcceptHeader is present in a Request, the server SHOULD assume a media of type "application" and subType "sdp". If an AcceptHeader is present, and if the server cannot send a response which is acceptable according to the combined Accept field value, then the server should send a Response message with a NOT_ACCEPTABLE status code.
For example:
Accept: application/sdp;level=1, application/x-private, text/html
Field Summary | |
static java.lang.String |
NAME
Name of AcceptHeader |
Method Summary | |
boolean |
allowsAllContentSubTypes()
Gets boolean value to indicate if the AcceptHeader allows all media sub-types, that is the content sub-type is "*". |
boolean |
allowsAllContentTypes()
Gets boolean value to indicate if the AcceptHeader allows all media types, that is the content type is "*". |
float |
getQValue()
Gets q-value of media-range in AcceptHeader. |
void |
setQValue(float qValue)
Sets q-value for media-range in AcceptHeader. |
Methods inherited from interface javax.sip.header.MediaType |
getContentSubType, getContentType, setContentSubType, setContentType |
Methods inherited from interface javax.sip.header.Parameters |
getParameter, getParameterNames, removeParameter, setParameter |
Methods inherited from interface javax.sip.header.Header |
clone, equals, getName, toString |
Field Detail |
public static final java.lang.String NAME
Method Detail |
public void setQValue(float qValue) throws InvalidArgumentException
qValue
- - the new float value of the q-value, a value of -1 resets
the qValue.
InvalidArgumentException
- if the q parameter value is not
-1
or between 0 and 1
.public float getQValue()
-1
indicates theq-value
is not set.
public boolean allowsAllContentSubTypes()
public boolean allowsAllContentTypes()
|
JAIN SIP API v1.1 - 23rd June 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |