/** * Set the method. * * @param method is the method to set. * @throws IllegalArgumentException if the method is null */ public void setMethod(String method) { if (method == null) throw new IllegalArgumentException("null method"); if (this.requestLine == null) { this.requestLine = new RequestLine(); } // Set to standard constants to speed up processing. // this makes equals compares run much faster in the // stack because then it is just identity comparision String meth = getCannonicalName(method); this.requestLine.setMethod(meth); if (this.cSeqHeader != null) { try { this.cSeqHeader.setMethod(meth); } catch (ParseException e) { } } }
/** * Patch up the request line as necessary. */ protected void setRequestLineDefaults() { String method = requestLine.getMethod(); if (method == null) { CSeq cseq = (CSeq) this.getCSeq(); if (cseq != null) { method = getCannonicalName(cseq.getMethod()); requestLine.setMethod(method); } } }
public RequestLine parse() throws ParseException { if (debug) dbg_enter("parse"); try { RequestLine retval = new RequestLine(); String m = method(); lexer.SPorHT(); retval.setMethod(m); this.lexer.selectLexer("sip_urlLexer"); URLParser urlParser = new URLParser(this.getLexer()); GenericURI url = urlParser.uriReference(true); lexer.SPorHT(); retval.setUri(url); this.lexer.selectLexer("request_lineLexer"); String v = sipVersion(); retval.setSipVersion(v); lexer.SPorHT(); lexer.match('\n'); return retval; } finally { if (debug) dbg_leave("parse"); } }
public RequestLine parse() throws ParseException { if (debug) dbg_enter("parse"); try { RequestLine retval = new RequestLine(); String m = method(); lexer.SPorHT(); retval.setMethod(m); this.lexer.selectLexer("sip_urlLexer"); URLParser urlParser = new URLParser(this.getLexer()); GenericURI url = urlParser.uriReference(true); lexer.SPorHT(); retval.setUri(url); this.lexer.selectLexer("request_lineLexer"); String v = sipVersion(); retval.setSipVersion(v); lexer.SPorHT(); lexer.match('\n'); return retval; } finally { if (debug) dbg_leave("parse"); } }