📄 messagefactory.html
字号:
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../javax/sip/message/Response.html" title="interface in javax.sip.message">Response</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/sip/message/MessageFactory.html#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, java.lang.Object)">createResponse</A></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,
java.lang.Object content)</CODE>
<BR>
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 Java object and the body content type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../javax/sip/message/Response.html" title="interface in javax.sip.message">Response</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/sip/message/MessageFactory.html#createResponse(int, javax.sip.message.Request)">createResponse</A></B>(int statusCode,
<A HREF="../../../javax/sip/message/Request.html" title="interface in javax.sip.message">Request</A> request)</CODE>
<BR>
Creates a new Response message of type specified by the statusCode paramater, based on a specific Request message.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../javax/sip/message/Response.html" title="interface in javax.sip.message">Response</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/sip/message/MessageFactory.html#createResponse(int, javax.sip.message.Request, javax.sip.header.ContentTypeHeader, byte[])">createResponse</A></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)</CODE>
<BR>
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.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../javax/sip/message/Response.html" title="interface in javax.sip.message">Response</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/sip/message/MessageFactory.html#createResponse(int, javax.sip.message.Request, javax.sip.header.ContentTypeHeader, java.lang.Object)">createResponse</A></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)</CODE>
<BR>
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.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../javax/sip/message/Response.html" title="interface in javax.sip.message">Response</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/sip/message/MessageFactory.html#createResponse(java.lang.String)">createResponse</A></B>(java.lang.String response)</CODE>
<BR>
Creates a Response from a String.</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="createRequest(javax.sip.address.URI, java.lang.String, 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, java.lang.Object)"><!-- --></A><H3>
createRequest</H3>
<PRE>
<A HREF="../../../javax/sip/message/Request.html" title="interface in javax.sip.message">Request</A> <B>createRequest</B>(<A HREF="../../../javax/sip/address/URI.html" title="interface in javax.sip.address">URI</A> requestURI,
java.lang.String method,
<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,
java.lang.Object content)
throws java.text.ParseException</PRE>
<DL>
<DD>Creates a new Request message of type specified by the method paramater, containing the URI of the Request, the mandatory headers of the message with a body in the form of a Java object and the body content type.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>requestURI</CODE> - the new URI object of the requestURI value of this Message.<DD><CODE>method</CODE> - the new string of the method 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 Object of the body content value of this Message.
<DT><B>Returns:</B><DD>the newly created Request object.
<DT><B>Throws:</B>
<DD><CODE>java.text.ParseException</CODE> - which signals that an error has been reached unexpectedly while parsing the method or the body.</DL>
</DD>
</DL>
<HR>
<A NAME="createRequest(javax.sip.address.URI, java.lang.String, 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>
createRequest</H3>
<PRE>
<A HREF="../../../javax/sip/message/Request.html" title="interface in javax.sip.message">Request</A> <B>createRequest</B>(<A HREF="../../../javax/sip/address/URI.html" title="interface in javax.sip.address">URI</A> requestURI,
java.lang.String method,
<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 Request message of type specified by the method paramater, containing the URI of the Request, the mandatory headers of the message with a body in the form of a byte array and body content type.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>requestURI</CODE> - the new URI object of the requestURI value of this Message.<DD><CODE>method</CODE> - the new string of the method 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 Request object.
<DT><B>Throws:</B>
<DD><CODE>java.text.ParseException</CODE> - which signals that an error has been reached unexpectedly while parsing the method or the body.</DL>
</DD>
</DL>
<HR>
<A NAME="createRequest(javax.sip.address.URI, java.lang.String, 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>
createRequest</H3>
<PRE>
<A HREF="../../../javax/sip/message/Request.html" title="interface in javax.sip.message">Request</A> <B>createRequest</B>(<A HREF="../../../javax/sip/address/URI.html" title="interface in javax.sip.address">URI</A> requestURI,
java.lang.String method,
<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 Request message of type specified by the method paramater, containing the URI of the Request, the mandatory headers of the message. This new Request does not contain a body.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>requestURI</CODE> - the new URI object of the requestURI value of this Message.<DD><CODE>method</CODE> - the new string of the method 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 Request object.
<DT><B>Throws:</B>
<DD><CODE>java.text.ParseException</CODE> - which signals that an error has been reached unexpectedly while parsing the method.</DL>
</DD>
</DL>
<HR>
<A NAME="createRequest(java.lang.String)"><!-- --></A><H3>
createRequest</H3>
<PRE>
<A HREF="../../../javax/sip/message/Request.html" title="interface in javax.sip.message">Request</A> <B>createRequest</B>(java.lang.String request)
throws java.text.ParseException</PRE>
<DL>
<DD>Create a new SIP Request object based on a specific string value. This method parses the supplied string into a SIP Request. The request string should only consist of the SIP portion of the Request and not the content. Supplying a null argument creates an empty SIP Request which may be used to end out "keep alive" messages for a connection.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - the new string value of the Request.
<DT><B>Returns:</B><DD>the newly created Request object.
<DT><B>Throws:</B>
<DD><CODE>java.text.ParseException</CODE> - which signals that an error has been reached unexpectedly while parsing the request.</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, 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/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,
java.lang.Object 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 Java object 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 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>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -