jain.protocol.ip.sip.header
Class AcceptEncodingHeader

java.lang.Object
  |
  +--jain.protocol.ip.sip.header.Header
        |
        +--jain.protocol.ip.sip.header.GeneralHeader
              |
              +--jain.protocol.ip.sip.header.AcceptEncodingHeader

public final class AcceptEncodingHeader
extends GeneralHeader

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

If no AcceptEncodingHeader is present in a RequestMessage, the server may assume that the client will accept any content coding. 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 ResponseMessage with a status code of CLIENT_ERROR_NOT_ACCEPTABLE. An empty AcceptEncodingHeader value indicates none are acceptable.

Version:
0.6

Field Summary
static java.lang.String token
          Token of AcceptEncodingHeader
 
Fields inherited from class jain.protocol.ip.sip.header.Header
ENTITY_HEADER, GENERAL_HEADER, REQUEST_HEADER, RESPONSE_HEADER
 
Constructor Summary
AcceptEncodingHeader(java.lang.String contentCoding)
          creates an AcceptEncodingHeader with given content-coding
 
Method Summary
 java.lang.Object clone()
          Creates and returns a copy of AcceptEncodingHeader
 boolean equals(AcceptEncodingHeader acceptEncodingHeader)
          Indicates whether some other AcceptEncodingHeader is "equal to" this one
 java.lang.String getContentCoding()
          Gets the content-coding of AcceptEncodingHeader
 java.lang.String getValue()
          Gets value of AcceptEncodingHeader
 void setContentCoding(java.lang.String contentCoding)
          Sets the content-coding of AcceptEncodingHeader
 
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

token

public static final java.lang.String token
Token of AcceptEncodingHeader
Constructor Detail

AcceptEncodingHeader

public AcceptEncodingHeader(java.lang.String contentCoding)
                     throws java.lang.IllegalArgumentException
creates an AcceptEncodingHeader with given content-coding
Parameters:
contentCoding - the content-coding
Throws:
java.lang.IllegalArgumentException - if contentCoding is null
Method Detail

getContentCoding

public java.lang.String getContentCoding()
Gets the content-coding of AcceptEncodingHeader
Returns:
content-coding of AcceptEncodingHeader

setContentCoding

public void setContentCoding(java.lang.String contentCoding)
                      throws java.lang.IllegalArgumentException
Sets the content-coding of AcceptEncodingHeader
Parameters:
contentCoding - content-coding
Throws:
java.lang.IllegalArgumentException - if contentCoding is null

getValue

public java.lang.String getValue()
Gets value of AcceptEncodingHeader
Overrides:
getValue in class Header
Returns:
value of AcceptEncodingHeader

clone

public java.lang.Object clone()
Creates and returns a copy of AcceptEncodingHeader
Overrides:
clone in class Header

equals

public boolean equals(AcceptEncodingHeader acceptEncodingHeader)
Indicates whether some other AcceptEncodingHeader is "equal to" this one
Parameters:
acceptEncodingHeader - the AcceptEncodingHeader with which to compare


If you have any comments or queries, please mail them to JAIN-SIP-interest@sun.com


Copyright - 2000 Sun Microsystems