topicpublisher.html

来自「SUN公司官方J2EE中文帮助文档 应该不错 有兴趣的下来看看 html格式的」· HTML 代码 · 共 370 行 · 第 1/2 页

HTML
370
字号
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->


<!-- ========= CONSTRUCTOR DETAIL ======== -->


<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="getTopic()"><!-- --></A><H3>
getTopic</H3>
<PRE>
public <A HREF="../../javax/jms/Topic.html">Topic</A> <B>getTopic</B>()
               throws <A HREF="../../javax/jms/JMSException.html">JMSException</A></PRE>
<DL>
<DD>Gets the topic associated with this <CODE>TopicPublisher</CODE>.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>this publisher's topic<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/jms/JMSException.html">JMSException</A></CODE> - if the JMS provider fails to get the topic for
                         this <CODE>TopicPublisher</CODE>
                         due to some internal error.</DL>
</DD>
</DL>
<HR>

<A NAME="publish(javax.jms.Message)"><!-- --></A><H3>
publish</H3>
<PRE>
public void <B>publish</B>(<A HREF="../../javax/jms/Message.html">Message</A>&nbsp;message)
             throws <A HREF="../../javax/jms/JMSException.html">JMSException</A></PRE>
<DL>
<DD>Publishes a message to the topic.
 Uses the <CODE>TopicPublisher</CODE>'s default delivery mode, priority,
 and time to live.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>message</CODE> - the message to publish<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/jms/JMSException.html">JMSException</A></CODE> - if the JMS provider fails to publish the message
                         due to some internal error.<DD><CODE><A HREF="../../javax/jms/MessageFormatException.html">MessageFormatException</A></CODE> - if an invalid message is specified.<DD><CODE><A HREF="../../javax/jms/InvalidDestinationException.html">InvalidDestinationException</A></CODE> - if a client uses this method
                         with a <CODE>TopicPublisher</CODE> with
                         an invalid topic.<DD><CODE>java.lang.UnsupportedOperationException</CODE> - if a client uses this
                         method with a <CODE>TopicPublisher</CODE> that
                         did not specify a topic at creation time.<DT><B>See Also: </B><DD><A HREF="../../javax/jms/MessageProducer.html#getDeliveryMode()"><CODE>MessageProducer.getDeliveryMode()</CODE></A>, 
<A HREF="../../javax/jms/MessageProducer.html#getTimeToLive()"><CODE>MessageProducer.getTimeToLive()</CODE></A>, 
<A HREF="../../javax/jms/MessageProducer.html#getPriority()"><CODE>MessageProducer.getPriority()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="publish(javax.jms.Message, int, int, long)"><!-- --></A><H3>
publish</H3>
<PRE>
public void <B>publish</B>(<A HREF="../../javax/jms/Message.html">Message</A>&nbsp;message,
                    int&nbsp;deliveryMode,
                    int&nbsp;priority,
                    long&nbsp;timeToLive)
             throws <A HREF="../../javax/jms/JMSException.html">JMSException</A></PRE>
<DL>
<DD>Publishes a message to the topic, specifying delivery mode,
 priority, and time to live.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>message</CODE> - the message to publish<DD><CODE>deliveryMode</CODE> - the delivery mode to use<DD><CODE>priority</CODE> - the priority for this message<DD><CODE>timeToLive</CODE> - the message's lifetime (in milliseconds)<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/jms/JMSException.html">JMSException</A></CODE> - if the JMS provider fails to publish the message
                         due to some internal error.<DD><CODE><A HREF="../../javax/jms/MessageFormatException.html">MessageFormatException</A></CODE> - if an invalid message is specified.<DD><CODE><A HREF="../../javax/jms/InvalidDestinationException.html">InvalidDestinationException</A></CODE> - if a client uses this method
                         with a <CODE>TopicPublisher</CODE> with
                         an invalid topic.<DD><CODE>java.lang.UnsupportedOperationException</CODE> - if a client uses this
                         method with a <CODE>TopicPublisher</CODE> that
                         did not specify a topic at creation time.</DL>
</DD>
</DL>
<HR>

<A NAME="publish(javax.jms.Topic, javax.jms.Message)"><!-- --></A><H3>
publish</H3>
<PRE>
public void <B>publish</B>(<A HREF="../../javax/jms/Topic.html">Topic</A>&nbsp;topic,
                    <A HREF="../../javax/jms/Message.html">Message</A>&nbsp;message)
             throws <A HREF="../../javax/jms/JMSException.html">JMSException</A></PRE>
<DL>
<DD>Publishes a message to a topic for an unidentified message producer. 
 Uses the <CODE>TopicPublisher</CODE>'s default delivery mode, 
 priority, and time to live.
  
 <P>Typically, a message producer is assigned a topic at creation 
 time; however, the JMS API also supports unidentified message producers,
 which require that the topic be supplied every time a message is
 published.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>topic</CODE> - the topic to publish this message to<DD><CODE>message</CODE> - the message to publish<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/jms/JMSException.html">JMSException</A></CODE> - if the JMS provider fails to publish the message
                         due to some internal error.<DD><CODE><A HREF="../../javax/jms/MessageFormatException.html">MessageFormatException</A></CODE> - if an invalid message is specified.<DD><CODE><A HREF="../../javax/jms/InvalidDestinationException.html">InvalidDestinationException</A></CODE> - if a client uses
                         this method with an invalid topic.<DT><B>See Also: </B><DD><A HREF="../../javax/jms/MessageProducer.html#getDeliveryMode()"><CODE>MessageProducer.getDeliveryMode()</CODE></A>, 
<A HREF="../../javax/jms/MessageProducer.html#getTimeToLive()"><CODE>MessageProducer.getTimeToLive()</CODE></A>, 
<A HREF="../../javax/jms/MessageProducer.html#getPriority()"><CODE>MessageProducer.getPriority()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="publish(javax.jms.Topic, javax.jms.Message, int, int, long)"><!-- --></A><H3>
publish</H3>
<PRE>
public void <B>publish</B>(<A HREF="../../javax/jms/Topic.html">Topic</A>&nbsp;topic,
                    <A HREF="../../javax/jms/Message.html">Message</A>&nbsp;message,
                    int&nbsp;deliveryMode,
                    int&nbsp;priority,
                    long&nbsp;timeToLive)
             throws <A HREF="../../javax/jms/JMSException.html">JMSException</A></PRE>
<DL>
<DD>Publishes a message to a topic for an unidentified message 
 producer, specifying delivery mode, priority and time to live.
  
 <P>Typically, a message producer is assigned a topic at creation
 time; however, the JMS API also supports unidentified message producers,
 which require that the topic be supplied every time a message is
 published.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>topic</CODE> - the topic to publish this message to<DD><CODE>message</CODE> - the message to publish<DD><CODE>deliveryMode</CODE> - the delivery mode to use<DD><CODE>priority</CODE> - the priority for this message<DD><CODE>timeToLive</CODE> - the message's lifetime (in milliseconds)<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/jms/JMSException.html">JMSException</A></CODE> - if the JMS provider fails to publish the message
                         due to some internal error.<DD><CODE><A HREF="../../javax/jms/MessageFormatException.html">MessageFormatException</A></CODE> - if an invalid message is specified.<DD><CODE><A HREF="../../javax/jms/InvalidDestinationException.html">InvalidDestinationException</A></CODE> - if a client uses
                         this method with an invalid topic.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <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>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../javax/jms/TopicConnectionFactory.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../javax/jms/TopicSession.html"><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="TopicPublisher.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&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>
<!-- =========== END OF NAVBAR =========== -->

<HR>

</BODY>
</HTML>

⌨️ 快捷键说明

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