📄 sipuri.html
字号:
<BR>
Sets the value of the <code>method</code> parameter.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/sip/address/SipURI.html#setPort(int)">setPort</A></B>(int port)</CODE>
<BR>
Set the port part of this SipURI to the newly supplied port parameter.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/sip/address/SipURI.html#setSecure(boolean)">setSecure</A></B>(boolean secure)</CODE>
<BR>
Sets the scheme of this URI to sip or sips depending on whether the argument is true or false.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/sip/address/SipURI.html#setTransportParam(java.lang.String)">setTransportParam</A></B>(java.lang.String transport)</CODE>
<BR>
Sets the value of the "transport" parameter.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/sip/address/SipURI.html#setTTLParam(int)">setTTLParam</A></B>(int ttl)</CODE>
<BR>
Sets the value of the <code>ttl</code> parameter.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/sip/address/SipURI.html#setUser(java.lang.String)">setUser</A></B>(java.lang.String user)</CODE>
<BR>
Sets the user of SipURI.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/sip/address/SipURI.html#setUserParam(java.lang.String)">setUserParam</A></B>(java.lang.String userParam)</CODE>
<BR>
Sets the value of the user parameter.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/sip/address/SipURI.html#setUserPassword(java.lang.String)">setUserPassword</A></B>(java.lang.String userPassword)</CODE>
<BR>
Sets the user password associated with the user of SipURI.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/sip/address/SipURI.html#toString()">toString</A></B>()</CODE>
<BR>
This method returns the URI as a string.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_javax.sip.address.URI"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface javax.sip.address.<A HREF="../../../javax/sip/address/URI.html" title="interface in javax.sip.address">URI</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/sip/address/URI.html#clone()">clone</A>, <A HREF="../../../javax/sip/address/URI.html#getScheme()">getScheme</A>, <A HREF="../../../javax/sip/address/URI.html#isSipURI()">isSipURI</A></CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_javax.sip.header.Parameters"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface javax.sip.header.<A HREF="../../../javax/sip/header/Parameters.html" title="interface in javax.sip.header">Parameters</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/sip/header/Parameters.html#getParameter(java.lang.String)">getParameter</A>, <A HREF="../../../javax/sip/header/Parameters.html#getParameterNames()">getParameterNames</A>, <A HREF="../../../javax/sip/header/Parameters.html#removeParameter(java.lang.String)">removeParameter</A>, <A HREF="../../../javax/sip/header/Parameters.html#setParameter(java.lang.String, java.lang.String)">setParameter</A></CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="setUser(java.lang.String)"><!-- --></A><H3>
setUser</H3>
<PRE>
void <B>setUser</B>(java.lang.String user)
throws java.text.ParseException</PRE>
<DL>
<DD>Sets the user of SipURI. The identifier of a particular resource at the host being addressed. The user and the user password including the '@' sign make up the user-info.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>user</CODE> - - the new String value of the user.
<DT><B>Throws:</B>
<DD><CODE>java.text.ParseException</CODE> - which signals that an error has been reached unexpectedly while parsing the user value.</DL>
</DD>
</DL>
<HR>
<A NAME="getUser()"><!-- --></A><H3>
getUser</H3>
<PRE>
java.lang.String <B>getUser</B>()</PRE>
<DL>
<DD>Returns the user part of this SipURI.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the user part of this SipURI, this value may be null.</DL>
</DD>
</DL>
<HR>
<A NAME="setUserPassword(java.lang.String)"><!-- --></A><H3>
setUserPassword</H3>
<PRE>
void <B>setUserPassword</B>(java.lang.String userPassword)
throws java.text.ParseException</PRE>
<DL>
<DD>Sets the user password associated with the user of SipURI. While the SIP and SIPS URI syntax allows this field to be present, its use is NOT RECOMMENDED, because the passing of authentication information in clear text (such as URIs) has proven to be a security risk in almost every case where it has been used. The user password and the user including the @ sign make up the user-info.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>userPassword</CODE> - - the new String value of the user password
<DT><B>Throws:</B>
<DD><CODE>java.text.ParseException</CODE> - which signals that an error has been reached unexpectedly while parsing the userPassword value.</DL>
</DD>
</DL>
<HR>
<A NAME="getUserPassword()"><!-- --></A><H3>
getUserPassword</H3>
<PRE>
java.lang.String <B>getUserPassword</B>()</PRE>
<DL>
<DD>Gets user password of SipURI, or null if it is not set.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the user password of this SipURI</DL>
</DD>
</DL>
<HR>
<A NAME="isSecure()"><!-- --></A><H3>
isSecure</H3>
<PRE>
boolean <B>isSecure</B>()</PRE>
<DL>
<DD>Returns true if this SipURI is secure i.e. if this SipURI represents a sips URI. A sip URI returns false.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD><code>true</code> if this SipURI represents a sips URI, and <code>false</code> if it represents a sip URI.</DL>
</DD>
</DL>
<HR>
<A NAME="setSecure(boolean)"><!-- --></A><H3>
setSecure</H3>
<PRE>
void <B>setSecure</B>(boolean secure)</PRE>
<DL>
<DD>Sets the scheme of this URI to sip or sips depending on whether the argument is true or false. The default value is false.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>secure</CODE> - - the boolean value indicating if the SipURI is secure.</DL>
</DD>
</DL>
<HR>
<A NAME="setHost(java.lang.String)"><!-- --></A><H3>
setHost</H3>
<PRE>
void <B>setHost</B>(java.lang.String host)
throws java.text.ParseException</PRE>
<DL>
<DD>Set the host part of this SipURI to the newly supplied <code>host</code> parameter.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>host</CODE> - - the new interger value of the host of this SipURI
<DT><B>Throws:</B>
<DD><CODE>java.text.ParseException</CODE> - which signals that an error has been reached unexpectedly while parsing the host value.</DL>
</DD>
</DL>
<HR>
<A NAME="getHost()"><!-- --></A><H3>
getHost</H3>
<PRE>
java.lang.String <B>getHost</B>()</PRE>
<DL>
<DD>Returns the host part of this SipURI.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the host part of this SipURI</DL>
</DD>
</DL>
<HR>
<A NAME="setPort(int)"><!-- --></A><H3>
setPort</H3>
<PRE>
void <B>setPort</B>(int port)</PRE>
<DL>
<DD>Set the port part of this SipURI to the newly supplied port parameter.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>port</CODE> - - the new interger value of the port of this SipURI</DL>
</DD>
</DL>
<HR>
<A NAME="getPort()"><!-- --></A><H3>
getPort</H3>
<PRE>
int <B>getPort</B>()</PRE>
<DL>
<DD>Returns the port part of this SipURI.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the port part of this SipURI</DL>
</DD>
</DL>
<HR>
<A NAME="removePort()"><!-- --></A><H3>
removePort</H3>
<PRE>
void <B>removePort</B>()</PRE>
<DL>
<DD>Removes the port part of this SipURI. If no port is specified the stack will assume the default port.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getHeader(java.lang.String)"><!-- --></A><H3>
getHeader</H3>
<PRE>
java.lang.String <B>getHeader</B>(java.lang.String name)</PRE>
<DL>
<DD>Returns the value of the named header, or null if it is not set. SIP/SIPS URIs may specify headers. As an example, the URI sip:jimmy@jcp.org?priority=urgent has a header "priority" whose value is "urgent".
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - name of header to retrieve
<DT><B>Returns:</B><DD>the value of specified header</DL>
</DD>
</DL>
<HR>
<A NAME="setHeader(java.lang.String, java.lang.String)"><!-- --></A><H3>
setHeader</H3>
<PRE>
void <B>setHeader</B>(java.lang.String name,
java.lang.String value)
throws java.text.ParseException</PRE>
<DL>
<DD>Sets the value of the specified header fields to be included in a request constructed from the URI. If the header already had a value it will be overwritten.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - - a String specifying the header name<DD><CODE>value</CODE> - - a String specifying the header value
<DT><B>Throws:</B>
<DD><CODE>java.text.ParseException</CODE> - which signals that an error has been reached unexpectedly while parsing the name or value parameters.</DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -