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

📄 contactheader.html

📁 jsip开发文档,对于开发SIP软电话和presence服务很有用
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0) on Wed Nov 15 07:55:48 PST 2006 -->
<TITLE>
ContactHeader (JSIP API v1.2)
</TITLE>

<META NAME="keywords" CONTENT="javax.sip.header.ContactHeader interface">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="ContactHeader (JSIP API v1.2)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" 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_top_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/header/CallInfoHeader.html" title="interface in javax.sip.header"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/sip/header/ContentDispositionHeader.html" title="interface in javax.sip.header"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html?javax/sip/header/ContactHeader.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="ContactHeader.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;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.sip.header</FONT>
<BR>
Interface ContactHeader</H2>
<DL>
<DT><B>All Superinterfaces:</B> <DD>java.lang.Cloneable, <A HREF="../../../javax/sip/header/Header.html" title="interface in javax.sip.header">Header</A>, <A HREF="../../../javax/sip/header/HeaderAddress.html" title="interface in javax.sip.header">HeaderAddress</A>, <A HREF="../../../javax/sip/header/Parameters.html" title="interface in javax.sip.header">Parameters</A>, java.io.Serializable</DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>ContactHeader</B><DT>extends <A HREF="../../../javax/sip/header/HeaderAddress.html" title="interface in javax.sip.header">HeaderAddress</A>, <A HREF="../../../javax/sip/header/Parameters.html" title="interface in javax.sip.header">Parameters</A>, <A HREF="../../../javax/sip/header/Header.html" title="interface in javax.sip.header">Header</A></DL>
</PRE>

<P>
A Contact header field value provides a URI whose meaning depends on the type of request or response it is in. A Contact header field value can contain a display name, a URI with URI parameters, and header parameters. <p> The Contact header field provides a SIP or SIPS URI that can be used to contact that specific instance of the User Agent for subsequent requests. The Contact header field MUST be present and contain exactly one SIP or SIPS URI in any request that can result in the establishment of a dialog.  For the methods defined in this specification, that includes only the INVITE request.  For these requests, the scope of the Contact is global.  That is, the Contact header field value contains the URI at which the User Agent would like to receive requests, and this URI MUST be valid even if used in subsequent requests outside of any dialogs. <p> If the Request-URI or top Route header field value contains a SIPS URI, the Contact header field MUST contain a SIPS URI as well. <p> <b>Messages and Contact Headers</b> <ul> <li>Requests: A contact header is mandatory for INVITE's and optional for ACK, OPTIONS and REGISTER requests. This allows the callee to send future Requests, such as BYE Requests, directly to the caller instead of through a series of proxies. <li>Informational Responses - A contact header is optional in a Informational Response to an INVITE request. It has the same semantics in an Informational Response as a Success Response. <li>Success Responses - A contact header is mandatory in response to INVITE's and optional in response to OPTIONS and REGISTER requests. An user agent server sending a Success Response to an INIVTE must insert a ContactHeader in the Response indicating the SIP address under which it is reachable most directly for future SIP Requests. <li>Redirection Responses - A contact header is optional in response to INVITE's, OPTIONS, REGISTER and BYE requests. A proxy may also delete the contact header. <li>Ambiguous Header: - A contact header is optional in response to INVITE, OPTIONS, REGISTER and BYE requests. </ul> The ContactHeader defines the Contact parameters "q" and "expires". The <code>q-value</code> value is used to prioritize addresses in a list of contact addresses. The <code>expires</code> value suggests an expiration interval that indicates how long the client would like a registration to be valid for a specific address. These parameters are only used when the Contact is present in a: <ul> <li>REGISTER request <li>REGISTER response <li>3xx response </ul> For Example:<br> <code> Contact: "Mr. Watson" sip:watson@worcester.jcp.org; q=0.7; expires=3600, "Mr. Watson" mailto:watson@jcp.org.com; q=0.1 </code>
<P>

<P>
<DL>
<DT><B>Author:</B></DT>
  <DD>BEA Systems, NIST</DD>
<DT><B>See Also:</B><DD><A HREF="../../../javax/sip/header/HeaderAddress.html" title="interface in javax.sip.header"><CODE>HeaderAddress</CODE></A>, 
<A HREF="../../../javax/sip/header/Parameters.html" title="interface in javax.sip.header"><CODE>Parameters</CODE></A></DL>
<HR>

<P>
<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/sip/header/ContactHeader.html#NAME">NAME</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name of ContactHeader</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/sip/header/ContactHeader.html#getExpires()">getExpires</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of the <code>expires</code> parameter or -1 if no  expires parameter was specified or if the parameter value cannot be  parsed as an int.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/sip/header/ContactHeader.html#getQValue()">getQValue</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of the <code>q-value</code> parameter of this ContactHeader.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/sip/header/ContactHeader.html#isWildCard()">isWildCard</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a boolean value that indicates if the contact header  has the format of Contact: *.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/sip/header/ContactHeader.html#setExpires(int)">setExpires</A></B>(int&nbsp;expires)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of the <code>expires</code> parameter as delta-seconds.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/sip/header/ContactHeader.html#setQValue(float)">setQValue</A></B>(float&nbsp;qValue)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the <code>qValue</code> value of the Name Address.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/sip/header/ContactHeader.html#setWildCard()">setWildCard</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets a wildcard on this contact address that is "*" is assigned to the  contact header so that the header will have the format of Contact: *.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_javax.sip.header.HeaderAddress"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface javax.sip.header.<A HREF="../../../javax/sip/header/HeaderAddress.html" title="interface in javax.sip.header">HeaderAddress</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/sip/header/HeaderAddress.html#getAddress()">getAddress</A>, <A HREF="../../../javax/sip/header/HeaderAddress.html#setAddress(javax.sip.address.Address)">setAddress</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_javax.sip.header.Parameters"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface javax.sip.header.<A HREF="../../../javax/sip/header/Parameters.html" title="interface in javax.sip.header">Parameters</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/sip/header/Parameters.html#getParameter(java.lang.String)">getParameter</A>, <A HREF="../../../javax/sip/header/Parameters.html#getParameterNames()">getParameterNames</A>, <A HREF="../../../javax/sip/header/Parameters.html#removeParameter(java.lang.String)">removeParameter</A>, <A HREF="../../../javax/sip/header/Parameters.html#setParameter(java.lang.String, java.lang.String)">setParameter</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_javax.sip.header.Header"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface javax.sip.header.<A HREF="../../../javax/sip/header/Header.html" title="interface in javax.sip.header">Header</A></B></TH>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -