📄 sipfactory.html
字号:
<!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>
SipFactory (JSIP API v1.2)
</TITLE>
<META NAME="keywords" CONTENT="javax.sip.SipFactory class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="SipFactory (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> </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/SipException.html" title="class in javax.sip"><B>PREV CLASS</B></A>
<A HREF="../../javax/sip/SipListener.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/SipFactory.html" target="_top"><B>FRAMES</B></A>
<A HREF="SipFactory.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_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.sip</FONT>
<BR>
Class SipFactory</H2>
<PRE>
java.lang.Object
<IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>javax.sip.SipFactory</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>SipFactory</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
The SipFactory is a singleton class which applications can use a single access point to obtain proprietary implementations of this specification. As the SipFactory is a singleton class there will only ever be one instance of the SipFactory. The single instance of the SipFactory can be obtained using the <A HREF="../../javax/sip/SipFactory.html#getInstance()"><CODE>getInstance()</CODE></A> method. If an instance of the SipFactory already exists it will be returned to the application, otherwise a new instance will be created. A peer implementation object can be obtained from the SipFactory by invoking the appropriate create method on the SipFactory e.g. to create a peer SipStack, an application would invoke the <A HREF="../../javax/sip/SipFactory.html#createSipStack(java.util.Properties)"><CODE>createSipStack(Properties)</CODE></A> method. <p> <b>Naming Convention</b><br> Note that the SipFactory utilises a naming convention defined by this specification to identify the location of proprietary objects that implement this specification. The naming convention is defined as follows: <ul> <li>The <b>upper-level package structure</b> referred to by the SipFactory with the attribute <var>pathname</var> can be used to differentiate between proprietary implementations from different SIP stack vendors. The <var>pathname</var> used by each SIP vendor <B>must be</B> the domain name assigned to that vendor in reverse order. For example, the pathname used by Sun Microsystem's would be <code>com.sun</code>. <li>The <b>lower-level package structure and classname</b> of a peer object is also mandated by this specification. The lowel-level package must be identical to the package structure defined by this specification and the classname is mandated to the interface name appended with the <code>Impl</code> post-fix. For example, the lower-level package structure and classname of a proprietary implementation of the <code>javax.sip.SipStack</code> interface <B>must</B> be <code>javax.sip.SipStackImpl</code>. </ul> Using this naming convention the SipFactory can locate a vendor's implementation of this specification without requiring an application to supply a user defined string to each create method in the SipFactory. Instead an application merely needs to identify the vendors SIP implementation it would like to use by setting the pathname of that vendors implementation. <p> It follows that a proprietary implementation of a peer object of this specification can be located at: <p> <code>'pathname'.'lower-level package structure and classname'.</code> <p> For example an application can use the SipFactory to instantiate a NIST peer SipStack object by setting the pathname to <code>gov.nist</code> and calling the createSipStack method. The SipFactory would return a new instance of the SipStack object at the following location: <code>gov.nist.javax.sip.SipStackImpl.java</code> Because the space of domain names is managed, this scheme ensures that collisions between two different vendor's implementations will not happen. For example: a different vendor with a domain name 'bea.com' would have their peer SipStack object located at <code>com.bea.javax.sip.SipStackImpl.java</code>. <p> <b>Default Namespace:</b><br> This specification defines a default namespace for the SipFactory, this namespace is the location of the Reference Implementation. The default namespace is <code>gov.nist</code> the author of the Reference Implementation, therefore the <var>pathname</var> will have the initial value of <code>gov.nist</code> for a new instance of the SipFactory. An application must set the <var>pathname</var> of the SipFactory on retrieval of a new instance of the factory in order to use a different vendors SIP stack from that of the Reference Implementation. An application can not mix different vendor's peer implementation objects.
<P>
<P>
<DL>
<DT><B>Author:</B></DT>
<DD>BEA Systems, NIST</DD>
</DL>
<HR>
<P>
<!-- ========== 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> <A HREF="../../javax/sip/address/AddressFactory.html" title="interface in javax.sip.address">AddressFactory</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/sip/SipFactory.html#createAddressFactory()">createAddressFactory</A></B>()</CODE>
<BR>
Creates an instance of the AddressFactory implementation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../javax/sip/header/HeaderFactory.html" title="interface in javax.sip.header">HeaderFactory</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/sip/SipFactory.html#createHeaderFactory()">createHeaderFactory</A></B>()</CODE>
<BR>
Creates an instance of the HeaderFactory implementation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../javax/sip/message/MessageFactory.html" title="interface in javax.sip.message">MessageFactory</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/sip/SipFactory.html#createMessageFactory()">createMessageFactory</A></B>()</CODE>
<BR>
Creates an instance of the MessageFactory implementation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../javax/sip/SipStack.html" title="interface in javax.sip">SipStack</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/sip/SipFactory.html#createSipStack(java.util.Properties)">createSipStack</A></B>(java.util.Properties properties)</CODE>
<BR>
Creates an instance of a SipStack implementation based on the configuration properties object passed to this method.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../javax/sip/SipFactory.html" title="class in javax.sip">SipFactory</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/sip/SipFactory.html#getInstance()">getInstance</A></B>()</CODE>
<BR>
Returns an instance of a SipFactory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/sip/SipFactory.html#getPathName()">getPathName</A></B>()</CODE>
<BR>
Returns the current <var>pathname</var> of the SipFactory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/sip/SipFactory.html#resetFactory()">resetFactory</A></B>()</CODE>
<BR>
This method reset's the SipFactory's references to the object's it has created.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/sip/SipFactory.html#setPathName(java.lang.String)">setPathName</A></B>(java.lang.String pathName)</CODE>
<BR>
Sets the <var>pathname</var> that identifies the location of a
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -