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

📄 advertisementfactory.html

📁 jxta的api库
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getAssocTable()"><!-- --></A><H3>getAssocTable</H3><PRE>protected java.util.Map <B>getAssocTable</B>()</PRE><DL><DD>Used by ClassFactory methods to get the mapping of keys to constructors.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../net/jxta/util/ClassFactory.html#getAssocTable()">getAssocTable</A></CODE> in class <CODE><A HREF="../../../net/jxta/util/ClassFactory.html" title="class in net.jxta.util">ClassFactory</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the hashtable containing the mappings.</DL></DD></DL><HR><A NAME="getClassOfInstantiators()"><!-- --></A><H3>getClassOfInstantiators</H3><PRE>public java.lang.Class <B>getClassOfInstantiators</B>()</PRE><DL><DD>Used by ClassFactory methods to ensure that all of the instance classes  which register with this factory have the correct base class<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../net/jxta/util/ClassFactory.html#getClassOfInstantiators()">getClassOfInstantiators</A></CODE> in class <CODE><A HREF="../../../net/jxta/util/ClassFactory.html" title="class in net.jxta.util">ClassFactory</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>Class object of the "Factory" type.</DL></DD></DL><HR><A NAME="getClassForKey()"><!-- --></A><H3>getClassForKey</H3><PRE>public java.lang.Class <B>getClassForKey</B>()</PRE><DL><DD>Used by ClassFactory methods to ensure that all keys used with the  mapping are of the correct type.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../net/jxta/util/ClassFactory.html#getClassForKey()">getClassForKey</A></CODE> in class <CODE><A HREF="../../../net/jxta/util/ClassFactory.html" title="class in net.jxta.util">ClassFactory</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>Class object of the key type.</DL></DD></DL><HR><A NAME="registerAssoc(java.lang.String)"><!-- --></A><H3>registerAssoc</H3><PRE>protected boolean <B>registerAssoc</B>(java.lang.String&nbsp;className)</PRE><DL><DD>Register a class with the factory from its class name. Since class name  doesn't tell us much, we just load the class and hope that something  happens as a result of the class loading. This class is often overridden  in class factories to interogate the instance class before registering  the instance class.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../net/jxta/util/ClassFactory.html#registerAssoc(java.lang.String)">registerAssoc</A></CODE> in class <CODE><A HREF="../../../net/jxta/util/ClassFactory.html" title="class in net.jxta.util">ClassFactory</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>className</CODE> - The class name which will be regiestered.<DT><B>Returns:</B><DD>boolean true if the class was registered otherwise false.</DL></DD></DL><HR><A NAME="registerAdvertisementInstance(java.lang.String, net.jxta.document.AdvertisementFactory.Instantiator)"><!-- --></A><H3>registerAdvertisementInstance</H3><PRE>public static boolean <B>registerAdvertisementInstance</B>(java.lang.String&nbsp;rootType,                                                    <A HREF="../../../net/jxta/document/AdvertisementFactory.Instantiator.html" title="interface in net.jxta.document">AdvertisementFactory.Instantiator</A>&nbsp;instantiator)</PRE><DL><DD>Register an instantiator for and advertisement type to allow instances  of that type to be created.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>rootType</CODE> - the identifying value for this advertisement instance   type<DD><CODE>instantiator</CODE> - the instantiator to use in constructing objects   of this rootType.<DT><B>Returns:</B><DD>boolean  true if the rootType type is registered. If there is   already a constructor for this type then false will be returned.</DL></DD></DL><HR><A NAME="newAdvertisement(java.lang.String)"><!-- --></A><H3>newAdvertisement</H3><PRE>public static <A HREF="../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A> <B>newAdvertisement</B>(java.lang.String&nbsp;advertisementType)</PRE><DL><DD>Constructs an instance of <A HREF="../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document"><CODE>Advertisement</CODE></A> matching the type specified by the <CODE>advertisementType</CODE> parameter.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>advertisementType</CODE> - Specifies the type of advertisement to create.<DT><B>Returns:</B><DD>The instance of <A HREF="../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document"><CODE>Advertisement</CODE></A>.<DT><B>Throws:</B><DD><CODE>java.util.NoSuchElementException</CODE> - if there is no matching advertisement type.</DL></DD></DL><HR><A NAME="newAdvertisement(net.jxta.document.MimeMediaType, java.io.InputStream)"><!-- --></A><H3>newAdvertisement</H3><PRE>public static <A HREF="../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A> <B>newAdvertisement</B>(<A HREF="../../../net/jxta/document/MimeMediaType.html" title="class in net.jxta.document">MimeMediaType</A>&nbsp;mimetype,                                             java.io.InputStream&nbsp;stream)                                      throws java.io.IOException</PRE><DL><DD>Constructs an instance of <A HREF="../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document"><CODE>Advertisement</CODE></A> from the provided <code>InputStream</code>. The content type of the stream is declared via the <code>mimetype</code> parameter.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>mimetype</CODE> - Specifies the mime media type of the stream being read.<DD><CODE>stream</CODE> - imput stream used to read data to construct the advertisement<DT><B>Returns:</B><DD>The instance of <A HREF="../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document"><CODE>Advertisement</CODE></A><DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - error reading message from input stream<DD><CODE>java.util.NoSuchElementException</CODE> - if there is no matching advertisement type for the type of document read in.<DD><CODE>java.lang.UnsupportedOperationException</CODE> - if the specified mime type is not  associated with a text oriented document type.</DL></DD></DL><HR><A NAME="newAdvertisement(net.jxta.document.MimeMediaType, java.io.Reader)"><!-- --></A><H3>newAdvertisement</H3><PRE>public static <A HREF="../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A> <B>newAdvertisement</B>(<A HREF="../../../net/jxta/document/MimeMediaType.html" title="class in net.jxta.document">MimeMediaType</A>&nbsp;mimetype,                                             java.io.Reader&nbsp;source)                                      throws java.io.IOException</PRE><DL><DD>Constructs an instance of <A HREF="../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document"><CODE>Advertisement</CODE></A> from the provided <code>Reader</code>. The content type of the reader is declared via the <code>mimetype</code> parameter.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>mimetype</CODE> - Specifies the mime media type of the stream being read.<DD><CODE>source</CODE> - used to read data to construct the advertisement.<DT><B>Returns:</B><DD>The instance of <A HREF="../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document"><CODE>Advertisement</CODE></A><DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - error reading message from input stream<DD><CODE>java.util.NoSuchElementException</CODE> - if there is no matching advertisement type for the type of document read in.<DD><CODE>java.lang.UnsupportedOperationException</CODE> - if the specified mime type is not  associated with a text oriented document type.</DL></DD></DL><HR><A NAME="newAdvertisement(net.jxta.document.TextElement)"><!-- --></A><H3>newAdvertisement</H3><PRE>public static <A HREF="../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A> <B>newAdvertisement</B>(<A HREF="../../../net/jxta/document/TextElement.html" title="interface in net.jxta.document">TextElement</A>&nbsp;root)</PRE><DL><DD>Constructs an instance of <A HREF="../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document"><CODE>Advertisement</CODE></A> matching the type specified by the <CODE>root</CODE> parameter.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>root</CODE> - Specifies a portion of a StructuredDocument which will be converted into an Advertisement.<DT><B>Returns:</B><DD>The instance of <A HREF="../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document"><CODE>Advertisement</CODE></A>.<DT><B>Throws:</B><DD><CODE>java.util.NoSuchElementException</CODE> - if there is no advertisement type matching the type of the root node.</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=3 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="class-use/AdvertisementFactory.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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>JXTA J2SE</EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../net/jxta/document/Attribute.html" title="class in net.jxta.document"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="AdvertisementFactory.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;<A HREF="#nested_class_summary">NESTED</A>&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></BODY></HTML>

⌨️ 快捷键说明

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