📄 siplistener.html
字号:
Request, the UAC will get one or more 2xx responses or one non-2xx final response. Because of the protracted amount of time it can take to receive final responses to an INVITE, the reliability mechanisms for INVITE transactions differ from those of other requests. A UAC needs to send an ACK for every final Response it receives, however the procedure for sending the ACK depends on the type of Response. For final responses between 300 and 699, the ACK processing is done by the transaction layer i.e. handled by the implementation. For 2xx responses, the ACK processing is done by the UAC application, to guarantee the three way handshake of an INVITE transaction. This specification defines a utility thats enables the SipProvider to handle the ACK processing for an INVITE transaction, see the <A HREF="../../javax/sip/SipStack.html#isRetransmissionFilterActive()"><CODE>SipStack.isRetransmissionFilterActive()</CODE></A>method. <br> A 2xx response to an INVITE establishes a session, and it also creates a dialog between the UAC that issued the INVITE and the UAS that generated the 2xx response. Therefore, when multiple 2xx responses are received from different remote User Agents, i.e. the INVITE forked, each 2xx establishes a different dialog and all these dialogs are part of the same call. If an INVITE client transaction returns a <A HREF="../../javax/sip/TimeoutEvent.html" title="class in javax.sip"><CODE>TimeoutEvent</CODE></A> rather than a response the UAC acts as if a 408 (Request Timeout) response had been received from the UAS. <p> <b>Stateful Proxies: </b> <br> A proxy application that handles a response statefully must do the following processing: <ul> <li>Find the appropriate response context. <li>Remove the topmost Via header. <li>Add the response to the response context. <li>Check to determine if this response should be forwarded immediately. <li>When necessary, choose the best final response from the response context. If no final response has been forwarded after every client transaction associated with the response context has been terminated, the proxy must choose and forward the "best" response from those it has seen so far. </ul> <p> Additionally the following processing MUST be performed on each response that is forwarded. <ul> <li>Aggregate authorization header values if necessary. <li>Optionally rewrite Record-Route header values. <li>Forward the response using the <A HREF="../../javax/sip/ServerTransaction.html#sendResponse(javax.sip.message.Response)"><CODE>ServerTransaction.sendResponse(Response)</CODE></A>method. <li>Generate any necessary CANCEL requests. </ul> <p> <b>Stateless Proxies: </b> <br> As a stateless proxy does not have any notion of transactions, or of the response context used to describe stateful proxy behavior, <code>responseEvent.getClientTransaction == null;</code> always return <var>true </var>. Response processing does not apply, the transaction layer of the SipProvider implementation is by-passed. An application intending to stateless proxy the Response MUST: <ul> <li>Inspect the sent-by value in the first Via header. <li>If that address matches the proxy, the proxy MUST remove that header from the response. <li>Forward the resulting response to the location indicated in the next Via header using the <A HREF="../../javax/sip/SipProvider.html#sendResponse(javax.sip.message.Response)"><CODE>SipProvider.sendResponse(Response)</CODE></A>method. </ul>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>responseEvent</CODE> - - the responseEvent fired from the SipProvider to the SipListener representing a Response received from the network.</DL>
</DD>
</DL>
<HR>
<A NAME="processTimeout(javax.sip.TimeoutEvent)"><!-- --></A><H3>
processTimeout</H3>
<PRE>
void <B>processTimeout</B>(<A HREF="../../javax/sip/TimeoutEvent.html" title="class in javax.sip">TimeoutEvent</A> timeoutEvent)</PRE>
<DL>
<DD>Processes a retransmit or expiration Timeout of an underlying <A HREF="../../javax/sip/Transaction.html" title="interface in javax.sip"><CODE>Transaction</CODE></A>handled by this SipListener. This Event notifies the application that a retransmission or transaction Timer expired in the SipProvider's transaction state machine. The TimeoutEvent encapsulates the specific timeout type and the transaction identifier either client or server upon which the timeout occured. The type of Timeout can by determined by: <code>timeoutType = timeoutEvent.getTimeout().getValue();</code>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>timeoutEvent</CODE> - - the timeoutEvent received indicating either the message retransmit or transaction timed out.</DL>
</DD>
</DL>
<HR>
<A NAME="processIOException(javax.sip.IOExceptionEvent)"><!-- --></A><H3>
processIOException</H3>
<PRE>
void <B>processIOException</B>(<A HREF="../../javax/sip/IOExceptionEvent.html" title="class in javax.sip">IOExceptionEvent</A> exceptionEvent)</PRE>
<DL>
<DD>Process an asynchronously reported IO Exception. Asynchronous IO Exceptions may occur as a result of errors during retransmission of requests. The transaction state machine requires to report IO Exceptions to the application immediately (according to RFC 3261). This method enables an implementation to propagate the asynchronous handling of IO Exceptions to the application.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>exceptionEvent</CODE> - -- The Exception event that is reported to the application.<DT><B>Since:</B></DT>
<DD>v1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="processTransactionTerminated(javax.sip.TransactionTerminatedEvent)"><!-- --></A><H3>
processTransactionTerminated</H3>
<PRE>
void <B>processTransactionTerminated</B>(<A HREF="../../javax/sip/TransactionTerminatedEvent.html" title="class in javax.sip">TransactionTerminatedEvent</A> transactionTerminatedEvent)</PRE>
<DL>
<DD>Process an asynchronously reported TransactionTerminatedEvent. When a transaction transitions to the Terminated state, the stack keeps no further records of the transaction. This notification can be used by applications to clean up any auxiliary data that is being maintained for the given transaction.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>transactionTerminatedEvent</CODE> - -- an event that indicates that the transaction has transitioned into the terminated state.<DT><B>Since:</B></DT>
<DD>v1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="processDialogTerminated(javax.sip.DialogTerminatedEvent)"><!-- --></A><H3>
processDialogTerminated</H3>
<PRE>
void <B>processDialogTerminated</B>(<A HREF="../../javax/sip/DialogTerminatedEvent.html" title="class in javax.sip">DialogTerminatedEvent</A> dialogTerminatedEvent)</PRE>
<DL>
<DD>Process an asynchronously reported DialogTerminatedEvent. When a dialog transitions to the Terminated state, the stack keeps no further records of the dialog. This notification can be used by applications to clean up any auxiliary data that is being maintained for the given dialog.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dialogTerminatedEvent</CODE> - -- an event that indicates that the dialog has transitioned into the terminated state.<DT><B>Since:</B></DT>
<DD>v1.2</DD>
</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=2 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> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<b>JSIP API v1.2<br><font size=-1>November 2006</font></b></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../javax/sip/SipFactory.html" title="class in javax.sip"><B>PREV CLASS</B></A>
<A HREF="../../javax/sip/SipProvider.html" title="interface in javax.sip"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html?javax/sip/SipListener.html" target="_top"><B>FRAMES</B></A>
<A HREF="SipListener.html" target="_top"><B>NO FRAMES</B></A>
<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: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<center>If you have any comments, please mail them to <a href=mailto:JAIN-SIP-INTEREST@java.sun.com>JAIN-SIP-INTEREST@java.sun.com</a> after subscribing at <a href=http://archives.java.sun.com>http://archives.java.sun.com</a><br><a href=../../copyright.html>Copyright</a> - 2006 BEA Systems and Sun Microsystems</center>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -