gov.nist.javax.sip.parser
Class AcceptEncodingParser

java.lang.Object
  extended by gov.nist.core.ParserCore
      extended by gov.nist.javax.sip.parser.Parser
          extended by gov.nist.javax.sip.parser.HeaderParser
              extended by gov.nist.javax.sip.parser.AcceptEncodingParser
All Implemented Interfaces:
TokenTypes

public class AcceptEncodingParser
extends HeaderParser

Accept-Encoding SIP (HTTP) Header parser.

Version:
1.2 $Revision: 1.7 $ $Date: 2009-07-17 18:57:56 $
Author:
Olivier Deruelle, M. Ranganathan

   The Accept-Encoding request-header field is similar to Accept, but
   restricts the content-codings (section 3.5) that are acceptable in
   the response.


       Accept-Encoding  = "Accept-Encoding" ":"
                      ( encoding *( "," encoding) )
       encoding         = ( codings *[ ";" "q" "=" qvalue ] )
       codings          = ( content-coding | "*" )

   Examples of its use are:

       Accept-Encoding: compress, gzip
       Accept-Encoding:
       Accept-Encoding: *
       Accept-Encoding: compress;q=0.5, gzip;q=1.0
       Accept-Encoding: gzip;q=1.0, identity; q=0.5, *;q=0
 

Field Summary
 
Fields inherited from class gov.nist.core.ParserCore
debug, lexer
 
Fields inherited from interface gov.nist.javax.sip.parser.TokenTypes
ACCEPT, ACCEPT_ENCODING, ACCEPT_LANGUAGE, ACK, ALERT_INFO, ALLOW, ALLOW_EVENTS, ALPHA, AND, AT, AUTHENTICATION_INFO, AUTHORIZATION, BACK_QUOTE, BACKSLASH, BAR, BYE, CALL_ID, CALL_INFO, CANCEL, COLON, CONTACT, CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_TYPE, CSEQ, DATE, DIGIT, DOLLAR, DOT, DOUBLEQUOTE, ENCRYPTION, END, EQUALS, ERROR_INFO, EVENT, EXCLAMATION, EXPIRES, FROM, GREATER_THAN, HAT, HIDE, HT, ID, IN_REPLY_TO, INVITE, JOIN_TO, L_CURLY, L_SQUARE_BRACKET, LESS_THAN, LPAREN, MAX_FORWARDS, MESSAGE, MIME_VERSION, MIN_EXPIRES, MINSE_TO, MINUS, NOTIFY, NULL, OPTIONS, ORGANIZATION, P_ACCESS_NETWORK_INFO, P_ASSERTED_IDENTITY, P_ASSERTED_SERVICE, P_ASSOCIATED_URI, P_CALLED_PARTY_ID, P_CHARGING_FUNCTION_ADDRESSES, P_MEDIA_AUTHORIZATION, P_MEDIA_AUTHORIZATION_TOKEN, P_PREFERRED_IDENTITY, P_PREFERRED_SERVICE, P_PROFILE_KEY, P_SERVED_USER, P_USER_DATABASE, P_VECTOR_CHARGING, P_VISITED_NETWORK_ID, PATH, PERCENT, PLUS, POUND, PRIORITY, PRIVACY, PROXY_AUTHENTICATE, PROXY_AUTHORIZATION, PROXY_REQUIRE, PUBLISH, QUESTION, QUOTE, R_CURLY, R_SQUARE_BRACKET, RACK, REASON, RECORD_ROUTE, REFER_TO, REFERENCES, REFERREDBY_TO, REGISTER, REPLACES_TO, REPLY_TO, REQUIRE, RESPONSE_KEY, RETRY_AFTER, ROUTE, RPAREN, RSEQ, SECURITY_CLIENT, SECURITY_SERVER, SECURITY_VERIFY, SEMICOLON, SERVER, SERVICE_ROUTE, SESSIONEXPIRES_TO, SIP, SIP_ETAG, SIP_IF_MATCH, SIPS, SLASH, SP, STAR, START, SUBJECT, SUBSCRIBE, SUBSCRIPTION_STATE, SUPPORTED, TEL, TILDE, TIMESTAMP, TO, UNDERSCORE, UNSUPPORTED, USER_AGENT, VIA, WARNING, WHITESPACE, WWW_AUTHENTICATE
 
Constructor Summary
protected AcceptEncodingParser(Lexer lexer)
          Constructor
  AcceptEncodingParser(String acceptEncoding)
          Constructor
 
Method Summary
 SIPHeader parse()
          parse the String message
 
Methods inherited from class gov.nist.javax.sip.parser.HeaderParser
date, headerName, time, wkday
 
Methods inherited from class gov.nist.javax.sip.parser.Parser
checkToken, createParseException, getLexer, method, sipVersion
 
Methods inherited from class gov.nist.core.ParserCore
dbg_enter, dbg_leave, nameValue, nameValue, peekLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AcceptEncodingParser

public AcceptEncodingParser(String acceptEncoding)
Constructor

Parameters:
acceptEncoding - message to parse

AcceptEncodingParser

protected AcceptEncodingParser(Lexer lexer)
Constructor

Parameters:
lexer - Lexer to set
Method Detail

parse

public SIPHeader parse()
                throws ParseException
parse the String message

Overrides:
parse in class HeaderParser
Returns:
SIPHeader (AcceptEncoding object)
Throws:
ParseException - if the message does not respect the spec.


Copyright © 2012. All Rights Reserved.