FileDocCategorySizeDatePackage
CallIDParser.javaAPI DocphoneME MR2 API (J2ME)2511Wed May 02 18:00:42 BST 2007gov.nist.siplite.parser

CallIDParser

public class CallIDParser extends HeaderParser
Parser for CALL ID header.
version
JAIN-SIP-1.1 This code is in the public domain.

Fields Summary
Constructors Summary
CallIDParser()
Default constructor.

public CallIDParser(String callID)
Creates new CallIdHeaderParser.

param
callID message to parse to set

        super(callID);
    
protected CallIDParser(Lexer lexer)
Constructor within initial lexer engine.

param
lexer to set

        super(lexer);
    
Methods Summary
public Headerparse()
Parses the String message.

return
Header (CallIdHeader object)
throws
ParseException if the message does not respect the spec.

        if (debug) dbg_enter("parse");
        try {
            this.lexer.match(TokenTypes.CALL_ID);
            this.lexer.SPorHT();
            this.lexer.match(':");
            this.lexer.SPorHT();
            
            CallIdHeader callID = new CallIdHeader();
            
            this.lexer.SPorHT();
            String rest = lexer.getRest();
            callID.setCallId(rest.trim());
            return callID;
        }finally {
            if (debug) dbg_leave("parse");
        }