⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sipserverconnection.html

📁 sipapi 说明文档.用于JAVA的SIP开发及应用.
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!-- =========== FIELD SUMMARY =========== -->


<!-- ======== CONSTRUCTOR SUMMARY ======== -->


<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/sip/SipServerConnection.html#initResponse(int)">initResponse</A></B>(int&nbsp;code)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initializes <tt>SipServerConnection</tt> with a specific SIP response  to the received request.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/sip/SipServerConnection.html#setReasonPhrase(java.lang.String)">setReasonPhrase</A></B>(java.lang.String&nbsp;phrase)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Changes the default reason phrase.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_javax.microedition.sip.SipConnection"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from interface javax.microedition.sip.<A HREF="../../../javax/microedition/sip/SipConnection.html" title="interface in javax.microedition.sip">SipConnection</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/microedition/sip/SipConnection.html#addHeader(java.lang.String, java.lang.String)">addHeader</A>, <A HREF="../../../javax/microedition/sip/SipConnection.html#getDialog()">getDialog</A>, <A HREF="../../../javax/microedition/sip/SipConnection.html#getHeader(java.lang.String)">getHeader</A>, <A HREF="../../../javax/microedition/sip/SipConnection.html#getHeaders(java.lang.String)">getHeaders</A>, <A HREF="../../../javax/microedition/sip/SipConnection.html#getMethod()">getMethod</A>, <A HREF="../../../javax/microedition/sip/SipConnection.html#getReasonPhrase()">getReasonPhrase</A>, <A HREF="../../../javax/microedition/sip/SipConnection.html#getRequestURI()">getRequestURI</A>, <A HREF="../../../javax/microedition/sip/SipConnection.html#getStatusCode()">getStatusCode</A>, <A HREF="../../../javax/microedition/sip/SipConnection.html#openContentInputStream()">openContentInputStream</A>, <A HREF="../../../javax/microedition/sip/SipConnection.html#openContentOutputStream()">openContentOutputStream</A>, <A HREF="../../../javax/microedition/sip/SipConnection.html#removeHeader(java.lang.String)">removeHeader</A>, <A HREF="../../../javax/microedition/sip/SipConnection.html#send()">send</A>, <A HREF="../../../javax/microedition/sip/SipConnection.html#setErrorListener(javax.microedition.sip.SipErrorListener)">setErrorListener</A>, <A HREF="../../../javax/microedition/sip/SipConnection.html#setHeader(java.lang.String, java.lang.String)">setHeader</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_javax.microedition.io.Connection"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from interface javax.microedition.io.Connection</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>close</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->


<!-- ========= CONSTRUCTOR DETAIL ======== -->


<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="initResponse(int)"><!-- --></A><H3>
initResponse</H3>
<PRE>
public void <B>initResponse</B>(int&nbsp;code)                  throws java.lang.IllegalArgumentException,                         <A HREF="../../../javax/microedition/sip/SipException.html" title="class in javax.microedition.sip">SipException</A></PRE>
<DL>
<DD>Initializes <tt>SipServerConnection</tt> with a specific SIP response  to the received request. The default headers and reason phrase will be  initialized automatically. After this the <tt>SipServerConnection</tt>  is in <em>Initialized</em> state. The response can be sent. <p> The procedure of generating the response and header fields  is defined in RFC 3261 [1] p. 49-50. At least following headers are  set by the method: <pre>    From     // MUST equal the From header field of the request    Call-ID  // MUST equal the Call-ID header field of the request    CSeq     // MUST equal the CSeq field of the request    Via      // MUST equal the Via header field values in the request                 and MUST maintain the same ordering    To       // MUST Copy if exists in the original request,                 'tag' MUST be added if not present    Contact  // If the server connection is in shared mode then the                 value is set by the system for REGISTER, INVITE,                 SUBSCRIBE and REFER. The value will be set according                 to the terminal IP settings and the connection's                 properties. If the connection is in the dedicated                 mode then the user part is set to some default value                 (e.g. 'user') which should be overwritten by the                 application.                 Example (dedicated mode),                  Contact: sip:user@172.21.55.69:5060                Example (shared mode),                  Contact: "Mr X" &lt;sip:mrx@172.21.55.69:5060&gt; </pre> <p> These headers will be set on behalf of the user by the implementation  the latest when sending the response. It implies that the header values may not be available for reading right after the <tt>initResponse</tt> method returns. The user may also set (overwrite) these headers, in this case the values set by the user take precedence over the values set by the implementation. <p> See RFC 3261, page 162: Table 2: Summary of header fields, and RFC  3265, 7.1 for header field usage in the SUBSCRIBE and NOTIFY methods, and also RFC 3515, 2.2 for header field usage in the REFER method.  <p> The following rules also apply:<br> If the system has automatically sent the "100 Trying"  response, the 100 response initialized and sent by the user is just  ignored.<br> If the system has automatically sent a response to a MESSAGE request  then this method will throw  <tt>SipException.ALREADY_RESPONDED</tt>. Systems that implement  the message relay functionality (see RFC3428 - Session Initiation  Protocol (SIP) Extension for Instant Messaging) inside the terminal  may have definitive knowledge that the terminal has already responded  with response code 202.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>code</CODE> - Response status code 1xx - 6xx<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the status code is out of  range 100-699 (RFC 3261 p.28-29)<DD><CODE><A HREF="../../../javax/microedition/sip/SipException.html" title="class in javax.microedition.sip">SipException</A></CODE> - INVALID_STATE if the  response can not be initialized, because of wrong state.  ALREADY_RESPONDED if the system has already sent a response to a MESSAGE request.</DL>
</DD>
</DL>
<HR>

<A NAME="setReasonPhrase(java.lang.String)"><!-- --></A><H3>
setReasonPhrase</H3>
<PRE>
public void <B>setReasonPhrase</B>(java.lang.String&nbsp;phrase)                     throws <A HREF="../../../javax/microedition/sip/SipException.html" title="class in javax.microedition.sip">SipException</A></PRE>
<DL>
<DD>Changes the default reason phrase.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>phrase</CODE> - the reason phrase to be set. Empty string or null means  that an empty (zero-length) reason phrase will be set.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the reason phrase is illegal.<DD><CODE><A HREF="../../../javax/microedition/sip/SipException.html" title="class in javax.microedition.sip">SipException</A></CODE> - INVALID_STATE if the  response can not be initialized, because of wrong state.  INVALID_OPERATION if the reason phrase can not be set.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/microedition/sip/SipRefreshListener.html" title="interface in javax.microedition.sip"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/microedition/sip/SipServerConnectionListener.html" title="interface in javax.microedition.sip"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="SipServerConnection.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
<font size=-1>Copyright &copy; 2003-2007 Nokia Corporation. All Rights Reserved.<br/>   Java is a trademark of Sun Microsystems, Inc.
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -