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

📄 messageconsumer.html

📁 j2ee api,很好的api。我这现在有
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getMessageSelector()"><!-- --></A><H3>getMessageSelector</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getMessageSelector</B>()                          throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Gets this message consumer's message selector expression.<P><DD><DL><DT><B>Returns:</B><DD>this message consumer's message selector, or null if no         message selector exists for the message consumer (that is, if          the message selector was not set or was set to null or the          empty string)<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to get the message                         selector due to some internal error.</DL></DD></DL><HR><A NAME="getMessageListener()"><!-- --></A><H3>getMessageListener</H3><PRE>public <A HREF="../../javax/jms/MessageListener.html" title="interface in javax.jms">MessageListener</A> <B>getMessageListener</B>()                                   throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Gets the message consumer's <CODE>MessageListener</CODE>.<P><DD><DL><DT><B>Returns:</B><DD>the listener for the message consumer, or null if no listener is set<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to get the message                         listener due to some internal error.<DT><B>See Also:</B><DD><A HREF="../../javax/jms/MessageConsumer.html#setMessageListener(javax.jms.MessageListener)"><CODE>setMessageListener(javax.jms.MessageListener)</CODE></A></DL></DD></DL><HR><A NAME="setMessageListener(javax.jms.MessageListener)"><!-- --></A><H3>setMessageListener</H3><PRE>public void <B>setMessageListener</B>(<A HREF="../../javax/jms/MessageListener.html" title="interface in javax.jms">MessageListener</A>&nbsp;listener)                        throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Sets the message consumer's <CODE>MessageListener</CODE>.  <P>Setting the message listener to null is the equivalent of  unsetting the message listener for the message consumer. <P>The effect of calling <CODE>MessageConsumer.setMessageListener</CODE> while messages are being consumed by an existing listener or the consumer is being used to consume messages synchronously is undefined.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - the listener to which the messages are to be                  delivered<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to set the message                         listener due to some internal error.<DT><B>See Also:</B><DD><A HREF="../../javax/jms/MessageConsumer.html#getMessageListener()"><CODE>getMessageListener()</CODE></A></DL></DD></DL><HR><A NAME="receive()"><!-- --></A><H3>receive</H3><PRE>public <A HREF="../../javax/jms/Message.html" title="interface in javax.jms">Message</A> <B>receive</B>()                throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Receives the next message produced for this message consumer.   <P>This call blocks indefinitely until a message is produced or until this message consumer is closed. <P>If this <CODE>receive</CODE> is done within a transaction, the  consumer retains the message until the transaction commits.<P><DD><DL><DT><B>Returns:</B><DD>the next message produced for this message consumer, or  null if this message consumer is concurrently closed<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to receive the next                         message due to some internal error.</DL></DD></DL><HR><A NAME="receive(long)"><!-- --></A><H3>receive</H3><PRE>public <A HREF="../../javax/jms/Message.html" title="interface in javax.jms">Message</A> <B>receive</B>(long&nbsp;timeout)                throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Receives the next message that arrives within the specified timeout interval.   <P>This call blocks until a message arrives, the timeout expires, or this message consumer is closed. A <CODE>timeout</CODE> of zero never expires, and the call blocks  indefinitely.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>timeout</CODE> - the timeout value (in milliseconds)<DT><B>Returns:</B><DD>the next message produced for this message consumer, or  null if the timeout expires or this message consumer is concurrently  closed<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to receive the next                         message due to some internal error.</DL></DD></DL><HR><A NAME="receiveNoWait()"><!-- --></A><H3>receiveNoWait</H3><PRE>public <A HREF="../../javax/jms/Message.html" title="interface in javax.jms">Message</A> <B>receiveNoWait</B>()                      throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Receives the next message if one is immediately available.<P><DD><DL><DT><B>Returns:</B><DD>the next message produced for this message consumer, or  null if one is not available<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to receive the next                         message due to some internal error.</DL></DD></DL><HR><A NAME="close()"><!-- --></A><H3>close</H3><PRE>public void <B>close</B>()           throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Closes the message consumer. <P>Since a provider may allocate some resources on behalf of a <CODE>MessageConsumer</CODE> outside the Java virtual machine, clients  should close them when they are not needed. Relying on garbage collection to eventually reclaim these resources may not be timely enough. <P>This call blocks until a <CODE>receive</CODE> or message listener in  progress has completed. A blocked message consumer <CODE>receive</CODE>  call  returns null when this message consumer is closed.<P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to close the consumer                         due to some internal error.</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="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>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Ent. Ed. v1.4</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../javax/jms/Message.html" title="interface in javax.jms"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../javax/jms/MessageListener.html" title="interface in javax.jms"><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="MessageConsumer.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;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><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2003 Sun Microsystems, Inc. All rights reserved.</font></BODY></HTML>

⌨️ 快捷键说明

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