📄 sipprovider.html
字号:
<A HREF="../../javax/sip/TransactionUnavailableException.html" title="class in javax.sip">TransactionUnavailableException</A></PRE>
<DL>
<DD>An application has the responsibility of deciding to respond to a Request that does not match an existing server transaction. This method is called by an application that decides to respond to an unmatched Request statefully. This methods return a new unique server transaction that can be used to respond to the request statefully.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - the Request message that the doesn't match an existing transaction that the application decides to handle statefully.
<DT><B>Returns:</B><DD>a new unique server transaction.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../javax/sip/TransactionAlreadyExistsException.html" title="class in javax.sip">TransactionAlreadyExistsException</A></CODE> - if a transaction already exists that is already handling this Request. This may happen if the application gets retransmits of the same request before the initial transaction is allocated.
<DD><CODE><A HREF="../../javax/sip/TransactionUnavailableException.html" title="class in javax.sip">TransactionUnavailableException</A></CODE> - if a new transaction can not be created, for example the next hop of the request can not be determined.<DT><B>See Also:</B><DD><A HREF="../../javax/sip/ServerTransaction.html" title="interface in javax.sip"><CODE>ServerTransaction</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="sendRequest(javax.sip.message.Request)"><!-- --></A><H3>
sendRequest</H3>
<PRE>
void <B>sendRequest</B>(<A HREF="../../javax/sip/message/Request.html" title="interface in javax.sip.message">Request</A> request)
throws <A HREF="../../javax/sip/SipException.html" title="class in javax.sip">SipException</A></PRE>
<DL>
<DD>Sends the Request statelessly, that is no transaction record is associated with this action. This method implies that the application is functioning as a stateless proxy, hence the underlying SipProvider acts statelessly. A stateless proxy simply forwards every request it receives downstream and discards information about the Request message once the message has been forwarded. A stateless proxy does not have any notion of a transaction. <p> Once the Request message has been passed to this method, the SipProvider will forget about this Request. No transaction semantics will be associated with the Request and the SipProvider will not handle retranmissions for the Request. If these semantics are required it is the responsibility of the application not the SipProvider.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - the Request message to send statelessly
<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 Request for any reason.<DT><B>See Also:</B><DD><A HREF="../../javax/sip/message/Request.html" title="interface in javax.sip.message"><CODE>Request</CODE></A></DL>
</DD>
</DL>
<HR>
<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></PRE>
<DL>
<DD>Sends the Response statelessly, that is no transaction record is associated with this action. This method implies that the application is functioning as either a stateless proxy or a stateless UAS. <ul> <li> Stateless proxy - A stateless proxy simply forwards every response it receives upstream and discards information about the response message once the message has been forwarded. A stateless proxy does not have any notion of a transaction. <li>Stateless UAS - A stateless UAS does not maintain transaction state. It replies to requests normally, but discards any state that would ordinarily be retained by a UAS after a response has been sent. If a stateless UAS receives a retransmission of a request, it regenerates the response and resends it, just as if it were replying to the first instance of the request. A UAS cannot be stateless unless the request processing for that method would always result in the same response if the requests are identical. Stateless UAS's do not use a transaction layer; they receive requests directly from the transport layer and send responses directly to the transport layer. </ul>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>response</CODE> - the Response to send statelessly.
<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 reason.<DT><B>See Also:</B><DD><A HREF="../../javax/sip/message/Response.html" title="interface in javax.sip.message"><CODE>Response</CODE></A>,
<A HREF="../../javax/sip/message/Response.html" title="interface in javax.sip.message"><CODE>Response</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getNewDialog(javax.sip.Transaction)"><!-- --></A><H3>
getNewDialog</H3>
<PRE>
<A HREF="../../javax/sip/Dialog.html" title="interface in javax.sip">Dialog</A> <B>getNewDialog</B>(<A HREF="../../javax/sip/Transaction.html" title="interface in javax.sip">Transaction</A> transaction)
throws <A HREF="../../javax/sip/SipException.html" title="class in javax.sip">SipException</A></PRE>
<DL>
<DD>Create a dialog for the given transaction. This method is only called when AUTOMATIC_DIALOG_SUPPORT is off. This method is invoked when the application wants to explicitly manage the association between transaction and dialog. This must may only be called on a dialog-creating transaction. Dialogs are created in advance, before any responses are sent or received, using the initial client or server transaction. The Dialog state is set to null when the dialog is created. The server side of a dialog calls this method before sending out the response to a dialog creating request. The client side of the dialog calls this method before sending out the initial request via the dialog creating transaction. The caller is required to set up the tags and other information in the request/response before calling this method. <p> For UAC's Forked calls are handled as follows: The response of a forked call that completes the initially created dialog will use the original dialog that is associated with the transaction. Subsequent responses that correspond to other branches of the fork ( ie. with the same From header tag, and Call ID but different To header tags) result in the creation of additional dialogs that are associated with these responses. The created dialog is made available to the UAC ( Listener ) via the method ResponseEvent.getDialog <p> Transactions that belong to the Dialog are automatically associated with the Dialog by the stack and can be retrieved with Transaction.getDialog().
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>transaction</CODE> - - transaction that is used to extract the relevant information to create the dialog.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../javax/sip/SipException.html" title="class in javax.sip">SipException</A></CODE> - if one or more of the following is true: <br/> <ol> <li>The Method of the Request is not a Dialog creating </li> <li>There is missing required information such as From header Tag in the Request </li> <li>This method is called after the response recieved on the client side </li> <li>This method is called after the response is sent out on the server side of the dialog. </li></ol><DT><B>Since:</B></DT>
<DD>1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="setAutomaticDialogSupportEnabled(boolean)"><!-- --></A><H3>
setAutomaticDialogSupportEnabled</H3>
<PRE>
void <B>setAutomaticDialogSupportEnabled</B>(boolean flag)</PRE>
<DL>
<DD>Enable or disable automatic dialog creation for this Provider. By default, each provider inherits the automatic dialog support property from the stack(i.e. the value implied by the stack configuration property javax.sip.AUTOMATIC_DIALOG_SUPPORT) . This method allows for selective overriding of the stack-wide property on a per provider basis. This is useful for applications that need to support both user agent and proxy functionality in a single stack such as IMS applications and 3rd party call control. Provider instances that need to proxy requests while functioning transaction statefully should turn this property off. Provider instances that need to at as user agents can turn this support on and get the benifit of automatic dialog creation. If this support is enabled, then Dialog creating Transactions (i.e. INVITE) that are associated with this Provider automatically create a Dialog when the Transaction is created. If this support is disabled, then Transactions associated with this Provider do not result in the automatic creation of an associated Dialog at the time of Transaction creation.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>flag</CODE> - - enables or disables automatic dialog support for this provider.<DT><B>Since:</B></DT>
<DD>v1.2</DD>
<DT><B>See Also:</B><DD><A HREF="../../javax/sip/SipStack.html" title="interface in javax.sip"><CODE>SipStack</CODE></A></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/SipListener.html" title="interface in javax.sip"><B>PREV CLASS</B></A>
<A HREF="../../javax/sip/SipStack.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/SipProvider.html" target="_top"><B>FRAMES</B></A>
<A HREF="SipProvider.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 + -