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

📄 siprefreshhelper.html

📁 sipapi 说明文档.用于JAVA的SIP开发及应用.
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.4.2_10) on Wed Feb 28 12:31:09 CET 2007 -->
<TITLE>
SipRefreshHelper (JSR180 SIP API for J2ME)
</TITLE>

<META NAME="keywords" CONTENT="javax.microedition.sip.SipRefreshHelper class">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="SipRefreshHelper (JSR180 SIP API for J2ME)";
}
</SCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">

<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" 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_top_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/SipHeader.html" title="class in javax.microedition.sip"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="SipRefreshHelper.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_top"></A><!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.microedition.sip</FONT>
<BR>
Class SipRefreshHelper</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><B>javax.microedition.sip.SipRefreshHelper</B>
</PRE>
<HR>
<DL>
<DT>public class <B>SipRefreshHelper</B><DT>extends java.lang.Object</DL>

<P>
This class implements the functionality that facilitates the handling of refreshing requests on behalf of the application. Some SIP requests (REGISTER, SUBSCRIBE, ...) need to be timely refreshed (binding between end point and server, see RFC 3261 - chapter 10.2.1 page 58). For example the REGISTER request (RFC 3261, chapter 10 page 56) needs to be re-sent to ensure that the originating end point is still well and alive. The request's validity is proposed by the end point in the request and confirmed in the response by the registrar/notifier for example in expires header (RFC 3261, chapter 2 page 5). The handling of such binding would significantly increase application complexity and size. As a consequence the <tt>SipRefreshHelper</tt> can be used to facilitate such operations. The specification does not define the strategy for timely refreshing of registrations and subscriptions, implementations may choose the algorithm of when to send the refresh request.<br> The implementation must support refreshing REGISTER and SUBSCRIBE requests  using the features of this class, however it is not mandated that  refreshing PUBLISH requests is supported by the refreshHelper mechanism.  Note that even if the <tt>SipRefreshHelper</tt> provides no support for  PUBLISH, refreshing PUBLISH requests is possible by sending the appropriate  SIP request from the application.<br> When the application wants to send a refreshable request it: <p> <UL> <LI>implements <A HREF="./SipRefreshListener.html"><tt>SipRefreshListener</tt> </A> callback interface. <LI>creates a new <A HREF="./SipClientConnection.html"> <tt>SipClientConnection</tt></A> and sets it up. <LI>calls the method <A HREF="./SipClientConnection.html#enableRefresh(javax.microedition.sip.SipRefreshListener)"> <tt>enableRefresh(SipRefreshListener)</tt></A>. A refresh ID is returned.  If the request is not refreshable the method returns 0. <LI>if the refresh task fails a failure event is sent to the <A HREF="./SipRefreshListener.html"><tt>SipRefreshListener</tt></A> </UL> </p> A reference to the <tt>SipRefreshHelper</tt> object is obtained by calling the static method <A HREF="./SipRefreshHelper.html#getInstance()"> <tt>SipRefreshHelper.getInstance()</tt></A> (singleton pattern). <br> <br> Finally, using the refresh ID returned from <A HREF="./SipClientConnection.html#enableRefresh(javax.microedition.sip.SipRefreshListener)"> <tt>enableRefresh(SipRefreshListener)</tt></A> the application can: <p> <UL> <LI><A HREF="./SipRefreshHelper.html#stop(int)"><tt>stop()</tt></A> a refresh. The possible binding between end point and server is cancelled (RFC3261, chapter 10.2.2 page 61). <LI><A HREF="./SipRefreshHelper.html#update(int, java.lang.String[], java.lang.String, int, int)"><tt>update(...)</tt></A> the refreshed request with new parameters (Contact info, expires header and new payload).  Note that this functionality is limited to the most typical case. A more complex case would require to stop the refresh and to create a new request with the needed updates. </UL> </p> When all refresh tasks belonging to one refresh listener are stopped, the listener reference will be removed from the <tt>SipRefreshHelper</tt>. <p> In case of failure of either the original request or a subsequent refresh  request the refreshing is automatically stopped and the failure response  is reported in the <tt>refreshEvent()</tt> callback. The corresponding  refresh ID is invalidated, so calling <tt>update()</tt> with the same ID  will throw an exception. The application has to start a new refresh task  if it wishes so and the implementation will assign a new refresh ID. <p> An implementation compliant to this  specification MUST report the refresh responses to the <tt>refreshEvent</tt> callback in case of failure response codes (3xx 

⌨️ 快捷键说明

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