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

📄 messagefactory.html

📁 jsip开发文档,对于开发SIP软电话和presence服务很有用
💻 HTML
📖 第 1 页 / 共 3 页
字号:

<A NAME="createResponse(int, javax.sip.header.CallIdHeader, javax.sip.header.CSeqHeader, javax.sip.header.FromHeader, javax.sip.header.ToHeader, java.util.List, javax.sip.header.MaxForwardsHeader, javax.sip.header.ContentTypeHeader, byte[])"><!-- --></A><H3>
createResponse</H3>
<PRE>
<A HREF="../../../javax/sip/message/Response.html" title="interface in javax.sip.message">Response</A> <B>createResponse</B>(int&nbsp;statusCode,
                        <A HREF="../../../javax/sip/header/CallIdHeader.html" title="interface in javax.sip.header">CallIdHeader</A>&nbsp;callId,
                        <A HREF="../../../javax/sip/header/CSeqHeader.html" title="interface in javax.sip.header">CSeqHeader</A>&nbsp;cSeq,
                        <A HREF="../../../javax/sip/header/FromHeader.html" title="interface in javax.sip.header">FromHeader</A>&nbsp;from,
                        <A HREF="../../../javax/sip/header/ToHeader.html" title="interface in javax.sip.header">ToHeader</A>&nbsp;to,
                        java.util.List&nbsp;via,
                        <A HREF="../../../javax/sip/header/MaxForwardsHeader.html" title="interface in javax.sip.header">MaxForwardsHeader</A>&nbsp;maxForwards,
                        <A HREF="../../../javax/sip/header/ContentTypeHeader.html" title="interface in javax.sip.header">ContentTypeHeader</A>&nbsp;contentType,
                        byte[]&nbsp;content)
                        throws java.text.ParseException</PRE>
<DL>
<DD>Creates a new Response message of type specified by the statusCode  paramater, containing the mandatory headers of the message with a body  in the form of a byte array and the body content type.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>statusCode</CODE> - the new integer of the statusCode value of this Message.<DD><CODE>callId</CODE> - the new CallIdHeader object of the callId value of this Message.<DD><CODE>cSeq</CODE> - the new CSeqHeader object of the cSeq value of this Message.<DD><CODE>from</CODE> - the new FromHeader object of the from value of this Message.<DD><CODE>to</CODE> - the new ToHeader object of the to value of this Message.<DD><CODE>via</CODE> - the new List object of the ViaHeaders of this Message.<DD><CODE>contentType</CODE> - the new ContentTypeHeader object of the content type  value of this Message.<DD><CODE>content</CODE> - the new byte array of the body content value of this Message.
<DT><B>Returns:</B><DD>the newly created Response object.
<DT><B>Throws:</B>
<DD><CODE>java.text.ParseException</CODE> - which signals that an error has been reached unexpectedly while parsing the statusCode or the body.</DL>
</DD>
</DL>
<HR>

<A NAME="createResponse(int, javax.sip.header.CallIdHeader, javax.sip.header.CSeqHeader, javax.sip.header.FromHeader, javax.sip.header.ToHeader, java.util.List, javax.sip.header.MaxForwardsHeader)"><!-- --></A><H3>
createResponse</H3>
<PRE>
<A HREF="../../../javax/sip/message/Response.html" title="interface in javax.sip.message">Response</A> <B>createResponse</B>(int&nbsp;statusCode,
                        <A HREF="../../../javax/sip/header/CallIdHeader.html" title="interface in javax.sip.header">CallIdHeader</A>&nbsp;callId,
                        <A HREF="../../../javax/sip/header/CSeqHeader.html" title="interface in javax.sip.header">CSeqHeader</A>&nbsp;cSeq,
                        <A HREF="../../../javax/sip/header/FromHeader.html" title="interface in javax.sip.header">FromHeader</A>&nbsp;from,
                        <A HREF="../../../javax/sip/header/ToHeader.html" title="interface in javax.sip.header">ToHeader</A>&nbsp;to,
                        java.util.List&nbsp;via,
                        <A HREF="../../../javax/sip/header/MaxForwardsHeader.html" title="interface in javax.sip.header">MaxForwardsHeader</A>&nbsp;maxForwards)
                        throws java.text.ParseException</PRE>
<DL>
<DD>Creates a new Response message of type specified by the statusCode  paramater, containing the mandatory headers of the message. This new  Response does not contain a body.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>statusCode</CODE> - the new integer of the statusCode value of this Message.<DD><CODE>callId</CODE> - the new CallIdHeader object of the callId value of this Message.<DD><CODE>cSeq</CODE> - the new CSeqHeader object of the cSeq value of this Message.<DD><CODE>from</CODE> - the new FromHeader object of the from value of this Message.<DD><CODE>to</CODE> - the new ToHeader object of the to value of this Message.<DD><CODE>via</CODE> - the new List object of the ViaHeaders of this Message.
<DT><B>Returns:</B><DD>the newly created Response object.
<DT><B>Throws:</B>
<DD><CODE>java.text.ParseException</CODE> - which signals that an error has been reached unexpectedly while parsing the statusCode.</DL>
</DD>
</DL>
<HR>

<A NAME="createResponse(int, javax.sip.message.Request, javax.sip.header.ContentTypeHeader, java.lang.Object)"><!-- --></A><H3>
createResponse</H3>
<PRE>
<A HREF="../../../javax/sip/message/Response.html" title="interface in javax.sip.message">Response</A> <B>createResponse</B>(int&nbsp;statusCode,
                        <A HREF="../../../javax/sip/message/Request.html" title="interface in javax.sip.message">Request</A>&nbsp;request,
                        <A HREF="../../../javax/sip/header/ContentTypeHeader.html" title="interface in javax.sip.header">ContentTypeHeader</A>&nbsp;contentType,
                        java.lang.Object&nbsp;content)
                        throws java.text.ParseException</PRE>
<DL>
<DD>Creates a new Response message of type specified by the statusCode  paramater, based on a specific Request with a new body in the form of a  Java object and the body content type. Only the required headers are  copied from the Request.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>statusCode</CODE> - the new integer of the statusCode value of this Message.<DD><CODE>request</CODE> - the received Reqest object upon which to base the Response.<DD><CODE>contentType</CODE> - the new ContentTypeHeader object of the content type  value of this Message.<DD><CODE>content</CODE> - the new Object of the body content value of this Message.
<DT><B>Returns:</B><DD>the newly created Response object.
<DT><B>Throws:</B>
<DD><CODE>java.text.ParseException</CODE> - which signals that an error has been reached unexpectedly while parsing the statusCode or the body.</DL>
</DD>
</DL>
<HR>

<A NAME="createResponse(int, javax.sip.message.Request, javax.sip.header.ContentTypeHeader, byte[])"><!-- --></A><H3>
createResponse</H3>
<PRE>
<A HREF="../../../javax/sip/message/Response.html" title="interface in javax.sip.message">Response</A> <B>createResponse</B>(int&nbsp;statusCode,
                        <A HREF="../../../javax/sip/message/Request.html" title="interface in javax.sip.message">Request</A>&nbsp;request,
                        <A HREF="../../../javax/sip/header/ContentTypeHeader.html" title="interface in javax.sip.header">ContentTypeHeader</A>&nbsp;contentType,
                        byte[]&nbsp;content)
                        throws java.text.ParseException</PRE>
<DL>
<DD>Creates a new Response message of type specified by the statusCode  paramater, based on a specific Request with a new body in the form of a  byte array and the body content type. Only the required headers are  copied from the Request.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>statusCode</CODE> - the new integer of the statusCode value of this Message.<DD><CODE>request</CODE> - the received Reqest object upon which to base the Response.<DD><CODE>contentType</CODE> - the new ContentTypeHeader object of the content type  value of this Message.<DD><CODE>content</CODE> - the new byte array of the body content value of this Message.
<DT><B>Returns:</B><DD>the newly created Response object.
<DT><B>Throws:</B>
<DD><CODE>java.text.ParseException</CODE> - which signals that an error has been reached unexpectedly while parsing the statusCode or the body.</DL>
</DD>
</DL>
<HR>

<A NAME="createResponse(int, javax.sip.message.Request)"><!-- --></A><H3>
createResponse</H3>
<PRE>
<A HREF="../../../javax/sip/message/Response.html" title="interface in javax.sip.message">Response</A> <B>createResponse</B>(int&nbsp;statusCode,
                        <A HREF="../../../javax/sip/message/Request.html" title="interface in javax.sip.message">Request</A>&nbsp;request)
                        throws java.text.ParseException</PRE>
<DL>
<DD>Creates a new Response message of type specified by the statusCode  paramater, based on a specific Request message. This new Response does  not contain a body. Only the required headers are copied from the  Request.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>statusCode</CODE> - the new integer of the statusCode value of this Message.<DD><CODE>request</CODE> - the received Reqest object upon which to base the Response.
<DT><B>Returns:</B><DD>the newly created Response object.
<DT><B>Throws:</B>
<DD><CODE>java.text.ParseException</CODE> - which signals that an error has been reached unexpectedly while parsing the statusCode.</DL>
</DD>
</DL>
<HR>

<A NAME="createResponse(java.lang.String)"><!-- --></A><H3>
createResponse</H3>
<PRE>
<A HREF="../../../javax/sip/message/Response.html" title="interface in javax.sip.message">Response</A> <B>createResponse</B>(java.lang.String&nbsp;response)
                        throws java.text.ParseException</PRE>
<DL>
<DD>Creates a Response from a String. This method parses the supplied string  into a SIP Response. The response string should only consist of the  SIP portion of the Response and not the content.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>response</CODE> - is a string representing the response. The argument should         only contain the Sip Headers and not the body of the response.
<DT><B>Throws:</B>
<DD><CODE>java.text.ParseException</CODE> - which signals an error has been reached unexpectedly while parsing the response.<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>&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>
<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">
&nbsp;<A HREF="../../../javax/sip/message/Message.html" title="interface in javax.sip.message"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/sip/message/Request.html" title="interface in javax.sip.message"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html?javax/sip/message/MessageFactory.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="MessageFactory.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>
<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 + -