November 2006

Interface AcceptEncodingHeader

All Superinterfaces:
java.lang.Cloneable, Encoding, Header, Parameters, java.io.Serializable

public interface AcceptEncodingHeader
extends Parameters, Encoding, Header

This interface represents the Accept-Encoding request-header. A client includes an AcceptEncodingHeader in a Request to tell the server what coding schemes are acceptable in the Response e.g. compress, gzip.

If an AcceptEncodingHeader is present, and if the server cannot send a Response which is acceptable according to the AcceptEncodingHeader, then the server should return a Response with a status code of NOT_ACCEPTABLE.

An empty Accept-Encoding header field is permissible, it is equivalent to Accept-Encoding: identity, meaning no encoding is permissible.

If no Accept-Encoding header field is present, the server SHOULD assume a default value of identity.

For Example:
Accept-Encoding: gzip

BEA Systems, NIST

Field Summary
static java.lang.String NAME
          Name of AcceptEncodingHeader
Method Summary
 float getQValue()
          Gets q-value of the encoding in this encoding value.
 void setQValue(float qValue)
          Sets q-value for the encoding in this encoding value.
Methods inherited from interface javax.sip.header.Parameters
getParameter, getParameterNames, removeParameter, setParameter
Methods inherited from interface javax.sip.header.Encoding
getEncoding, setEncoding
Methods inherited from interface javax.sip.header.Header
clone, equals, getName, hashCode, toString

Field Detail


static final java.lang.String NAME
Name of AcceptEncodingHeader

See Also:
Constant Field Values
Method Detail


float getQValue()
Gets q-value of the encoding in this encoding value. A value of -1 indicates theq-value is not set.

q-value of encoding value, -1 if q-value is not set.


void setQValue(float qValue)
               throws InvalidArgumentException
Sets q-value for the encoding in this encoding value. Q-values allow the user to indicate the relative degree of preference for that encoding, using the qvalue scale from 0 to 1. If no q-value is present, the encoding should be treated as having a q-value of 1.

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.

November 2006

If you have any comments, please mail them to JAIN-SIP-INTEREST@java.sun.com after subscribing at http://archives.java.sun.com
Copyright - 2006 BEA Systems and Sun Microsystems