📄 servertransaction.html
字号:
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface javax.sip.<A HREF="../../javax/sip/Transaction.html" title="interface in javax.sip">Transaction</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../javax/sip/Transaction.html#getApplicationData()">getApplicationData</A>, <A HREF="../../javax/sip/Transaction.html#getBranchId()">getBranchId</A>, <A HREF="../../javax/sip/Transaction.html#getDialog()">getDialog</A>, <A HREF="../../javax/sip/Transaction.html#getRequest()">getRequest</A>, <A HREF="../../javax/sip/Transaction.html#getRetransmitTimer()">getRetransmitTimer</A>, <A HREF="../../javax/sip/Transaction.html#getState()">getState</A>, <A HREF="../../javax/sip/Transaction.html#setApplicationData(java.lang.Object)">setApplicationData</A>, <A HREF="../../javax/sip/Transaction.html#setRetransmitTimer(int)">setRetransmitTimer</A>, <A HREF="../../javax/sip/Transaction.html#terminate()">terminate</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="sendResponse(javax.sip.message.Response)"><!-- --></A><H3>
sendResponse</H3>
<PRE>
void <B>sendResponse</B>(<A HREF="../../javax/sip/message/Response.html" title="interface in javax.sip.message">Response</A> response)
throws <A HREF="../../javax/sip/SipException.html" title="class in javax.sip">SipException</A>,
<A HREF="../../javax/sip/InvalidArgumentException.html" title="class in javax.sip">InvalidArgumentException</A></PRE>
<DL>
<DD>Sends the Response to a Request which is associated with this ServerTransaction. When an application wishes to send a Response, it creates a Response using the <A HREF="../../javax/sip/message/MessageFactory.html" title="interface in javax.sip.message"><CODE>MessageFactory</CODE></A> and then passes that Response to this method. The Response message gets sent out on the network via the ListeningPoint information that is associated with the SipProvider of this ServerTransaction. <p> This method implies that the application is functioning as either a UAS or a stateful proxy, hence the underlying implementation acts statefully. When a UAS sends a 2xx response to an INVITE, the server transaction is transitions to the TerminatedState. The implementation may delay physically removing ServerTransaction record from memory to catch retransmissions of the INVITE in accordance with the reccomendation of <a href="http://bugs.sipit.net/show_bug.cgi?id=769"> http://bugs.sipit.net/show_bug.cgi?id=769 </a>. <p><b>ACK Processing and final response retransmission:</b> <br/> If a Dialog is associated with the ServerTransaction then when the UAC sends the ACK ( the typical case for User Agents), the Application ( i.e. Listener ) will see a ServerTransaction corresponding to the ACK and the corresponding <A HREF="../../javax/sip/Dialog.html" title="interface in javax.sip"><CODE>Dialog</CODE></A> presented to it. The ACK will be presented to the Listener only once in this case. Retransmissions of the OK and filtering of ACK retransmission are the responsibility of the Dialog layer of this specification. However if no <A HREF="../../javax/sip/Dialog.html" title="interface in javax.sip"><CODE>Dialog</CODE></A> is associated with the INVITE Transaction, the ACK will be presented to the Application with a null Dialog in the <A HREF="../../javax/sip/RequestEvent.html" title="class in javax.sip"><CODE>RequestEvent</CODE></A> and there will be no Dialog associated with the ACK Transaction (i.e. <A HREF="../../javax/sip/Transaction.html#getDialog()"><CODE>Transaction.getDialog()</CODE></A> returns null). In this case (when there is no Dialog associated with the original INVITE or ACK) the Application is responsible for retransmission of the OK for the INVITE if necessary (i.e. if it wants to manage its own dialog layer and function as a User Agent) and for dealing with retransmissions of the ACK. This requires that the three way handshake of an INVITE is managed by the UAS application and not the implementation of this specification. <p> Note that Responses created via <A HREF="../../javax/sip/Dialog.html#createReliableProvisionalResponse(int)"><CODE>Dialog.createReliableProvisionalResponse(int)</CODE></A> should be sent using <A HREF="../../javax/sip/Dialog.html#sendReliableProvisionalResponse(javax.sip.message.Response)"><CODE>Dialog.sendReliableProvisionalResponse(Response)</CODE></A>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>response</CODE> - the Response to send to the Request.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../javax/sip/SipException.html" title="class in javax.sip">SipException</A></CODE> - if the SipProvider cannot send the Response for any other reason.
<DD><CODE><A HREF="../../javax/sip/InvalidArgumentException.html" title="class in javax.sip">InvalidArgumentException</A></CODE> - if the Response is created by <A HREF="../../javax/sip/Dialog.html#createReliableProvisionalResponse(int)"><CODE>Dialog.createReliableProvisionalResponse(int)</CODE></A> and the application attempts to use this method to send the response.<DT><B>See Also:</B><DD><A HREF="../../javax/sip/message/Response.html" title="interface in javax.sip.message"><CODE>Response</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="enableRetransmissionAlerts()"><!-- --></A><H3>
enableRetransmissionAlerts</H3>
<PRE>
void <B>enableRetransmissionAlerts</B>()
throws <A HREF="../../javax/sip/SipException.html" title="class in javax.sip">SipException</A></PRE>
<DL>
<DD>Enable the timeout retransmit notifications for the ServerTransaction. This method is invoked by UAs that do want to be alerted by the stack to retransmit 2XX responses but that do NOT want to associate a Dialog. The Default operation is to disable retransmission alerts for the Server Transaction when no Dialog is associated with the Server Transaction, as is common for a Proxy server. When this method is called, the stack will continue to generate <A HREF="../../javax/sip/Timeout.html#RETRANSMIT"><CODE>Timeout.RETRANSMIT</CODE></A> until the application calls <A HREF="../../javax/sip/Transaction.html#terminate()"><CODE>Transaction.terminate()</CODE></A> or a the listener receives a <A HREF="../../javax/sip/SipListener.html#processTransactionTerminated(javax.sip.TransactionTerminatedEvent)"><CODE>SipListener.processTransactionTerminated(TransactionTerminatedEvent)</CODE></A> callback. Note that the stack calls <A HREF="../../javax/sip/SipListener.html#processTransactionTerminated(javax.sip.TransactionTerminatedEvent)"><CODE>SipListener.processTransactionTerminated(TransactionTerminatedEvent)</CODE></A>asynchronously after it removes the transaction some time after the Transaction state is set to <A HREF="../../javax/sip/TransactionState.html#TERMINATED"><CODE>TransactionState.TERMINATED</CODE></A> ; after which, it maintains no record of the Transaction.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../javax/sip/SipException.html" title="class in javax.sip">SipException</A></CODE> - if a Dialog is already associated with the ServerTransaction when the method is called.<DT><B>Since:</B></DT>
<DD>1.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/ResponseEvent.html" title="class in javax.sip"><B>PREV CLASS</B></A>
<A HREF="../../javax/sip/SipException.html" title="class in javax.sip"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html?javax/sip/ServerTransaction.html" target="_top"><B>FRAMES</B></A>
<A HREF="ServerTransaction.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 + -