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

📄 advertisement.html

📁 jxta的api库
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="Advertisement()"><!-- --></A><H3>Advertisement</H3><PRE>public <B>Advertisement</B>()</PRE><DL></DL><!-- ============ 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="clone()"><!-- --></A><H3>clone</H3><PRE>public java.lang.Object <B>clone</B>()                       throws java.lang.CloneNotSupportedException</PRE><DL><DD><P><DD><DL><DT><B>Throws:</B><DD><CODE>java.lang.CloneNotSupportedException</CODE></DL></DD></DL><HR><A NAME="getAdvertisementType()"><!-- --></A><H3>getAdvertisementType</H3><PRE>public static java.lang.String <B>getAdvertisementType</B>()</PRE><DL><DD>Returns the identifying type of this Advertisement.  <p/><b>Note:</b> This is a static method. It cannot be used to determine  the runtime type of an advertisment. ie.  </p><code><pre>      Advertisement adv = module.getSomeAdv();      String advType = adv.getAdvertisementType();  </pre></code>  <p/><b>This is wrong and does not work the way you might expect.</b>  This call is not polymorphic and calls  Advertiement.getAdvertisementType() no matter what the real type of the  advertisment.<P><DD><DL><DT><B>Returns:</B><DD>String the type of advertisement</DL></DD></DL><HR><A NAME="getAdvType()"><!-- --></A><H3>getAdvType</H3><PRE>public java.lang.String <B>getAdvType</B>()</PRE><DL><DD>Returns the identifying type of this Advertisement. Unlike  <A HREF="../../../net/jxta/document/Advertisement.html#getAdvertisementType()"><CODE>getAdvertisementType()</CODE></A> this method will return the correct  runtime type of an Advertisement object.  <p/>This implementation is provided so as to NOT break the code of  existing advertisements. In most cases you should provide your own  implementation for efficeiny reasons.<P><DD><DL><DT><B>Returns:</B><DD>the identifying type of this Advertisement</DL></DD></DL><HR><A NAME="getDocument(net.jxta.document.MimeMediaType)"><!-- --></A><H3>getDocument</H3><PRE>public abstract <A HREF="../../../net/jxta/document/Document.html" title="interface in net.jxta.document">Document</A> <B>getDocument</B>(<A HREF="../../../net/jxta/document/MimeMediaType.html" title="class in net.jxta.document">MimeMediaType</A>&nbsp;asMimeType)</PRE><DL><DD>Write advertisement into a document. <code>asMimeType</code> is a mime  media-type specification and provides the form of the document which is  being requested. Two standard document forms are defined.  <code>"text/plain"</code> encodes the document in a "pretty-print"  format for human viewing and <code>"text/xml"<code> which provides an  XML format.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>asMimeType</CODE> - MimeMediaType format representation requested<DT><B>Returns:</B><DD>Document   the document to be used in the construction</DL></DD></DL><HR><A NAME="getID()"><!-- --></A><H3>getID</H3><PRE>public abstract <A HREF="../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A> <B>getID</B>()</PRE><DL><DD>Returns a unique ID suitable for indexing of this Advertisement.  <p/>The ID is supposed to be unique and is not guaranteed to be of  any particular subclass of ID. Each class of advertisement is  responsible for the choice of ID to return. The value for the ID  returned can either be: <p><ul>      <li>An ID which is already part of the advertisement definition      and is relatively unique between advertisements instances. For      example, the Peer Advertisement returns the Peer ID.</li>      <li>A static CodatID which is generated via some canonical process      which will produce the same value each time and different values for      different advertisements of the same type.</li>      <li>ID.nullID for advertisement types which are not readily indexed.      </li>  </ul>  <p/>Since this ID is normally used for indexing, the IDs returned must   be as unique as possible to avoid collisions.  <p/>For Advertisement types which normally return non-ID.nullID values  no ID should be returned when asked to generate an ID while the  Advertisement is an inconsistent state (example: unitialized index  fields). Instead <code>java.lang.IllegalStateException</code> should be  thrown.<P><DD><DL><DT><B>Returns:</B><DD>ID An ID that uniquely identifies the advertisement or ID.nullID  if this advertisement is of a type that is not normally indexed.</DL></DD></DL><HR><A NAME="getIndexFields()"><!-- --></A><H3>getIndexFields</H3><PRE>public abstract java.lang.String[] <B>getIndexFields</B>()</PRE><DL><DD>returns an array of String fields to index the advertisement on.<P><DD><DL><DT><B>Returns:</B><DD>String [] attributes to index this advertisement on.</DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public java.lang.String <B>toString</B>()</PRE><DL><DD>Return a string representaion of this advertisement. The string will contain the advertisement formated as a UTF-8 encoded XML Document.<P><DD><DL><DT><B>Returns:</B><DD>String  a String containing the advertisement.</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/Advertisement.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;PREV CLASS&nbsp;&nbsp;<A HREF="../../../net/jxta/document/AdvertisementFactory.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="Advertisement.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;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&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 + -