/** * Sets the RequestURI of Request. The Request-URI is a SIP or SIPS URI or a general URI. It * indicates the user or service to which this request is being addressed. SIP elements MAY * support Request-URIs with schemes other than "sip" and "sips", for example the "tel" URI * scheme. SIP elements MAY translate non-SIP URIs using any mechanism at their disposal, * resulting in SIP URI, SIPS URI, or some other scheme. * * @param uri the new Request URI of this request message */ public void setRequestURI(URI uri) { if ( uri == null ) { throw new NullPointerException("Null request URI"); } if (this.requestLine == null) { this.requestLine = new RequestLine(); } this.requestLine.setUri((GenericURI) uri); this.nullRequest = false; }
/** * 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) { } } }
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"); } }