📄 messagefactory.html
字号:
<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 statusCode,
<A HREF="../../../javax/sip/header/CallIdHeader.html" title="interface in javax.sip.header">CallIdHeader</A> callId,
<A HREF="../../../javax/sip/header/CSeqHeader.html" title="interface in javax.sip.header">CSeqHeader</A> cSeq,
<A HREF="../../../javax/sip/header/FromHeader.html" title="interface in javax.sip.header">FromHeader</A> from,
<A HREF="../../../javax/sip/header/ToHeader.html" title="interface in javax.sip.header">ToHeader</A> to,
java.util.List via,
<A HREF="../../../javax/sip/header/MaxForwardsHeader.html" title="interface in javax.sip.header">MaxForwardsHeader</A> maxForwards,
<A HREF="../../../javax/sip/header/ContentTypeHeader.html" title="interface in javax.sip.header">ContentTypeHeader</A> contentType,
byte[] 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 statusCode,
<A HREF="../../../javax/sip/header/CallIdHeader.html" title="interface in javax.sip.header">CallIdHeader</A> callId,
<A HREF="../../../javax/sip/header/CSeqHeader.html" title="interface in javax.sip.header">CSeqHeader</A> cSeq,
<A HREF="../../../javax/sip/header/FromHeader.html" title="interface in javax.sip.header">FromHeader</A> from,
<A HREF="../../../javax/sip/header/ToHeader.html" title="interface in javax.sip.header">ToHeader</A> to,
java.util.List via,
<A HREF="../../../javax/sip/header/MaxForwardsHeader.html" title="interface in javax.sip.header">MaxForwardsHeader</A> 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 statusCode,
<A HREF="../../../javax/sip/message/Request.html" title="interface in javax.sip.message">Request</A> request,
<A HREF="../../../javax/sip/header/ContentTypeHeader.html" title="interface in javax.sip.header">ContentTypeHeader</A> contentType,
java.lang.Object 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 statusCode,
<A HREF="../../../javax/sip/message/Request.html" title="interface in javax.sip.message">Request</A> request,
<A HREF="../../../javax/sip/header/ContentTypeHeader.html" title="interface in javax.sip.header">ContentTypeHeader</A> contentType,
byte[] 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 statusCode,
<A HREF="../../../javax/sip/message/Request.html" title="interface in javax.sip.message">Request</A> 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 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> </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/message/Message.html" title="interface in javax.sip.message"><B>PREV CLASS</B></A>
<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>
<A HREF="MessageFactory.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 + -