📄 queuesender.html
字号:
<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="getQueue()"><!-- --></A><H3>getQueue</H3><PRE>public <A HREF="../../javax/jms/Queue.html" title="interface in javax.jms">Queue</A> <B>getQueue</B>() throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Gets the queue associated with this <CODE>QueueSender</CODE>.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>this sender's queue<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 queue for this <CODE>QueueSender</CODE> due to some internal error.</DL></DD></DL><HR><A NAME="send(javax.jms.Message)"><!-- --></A><H3>send</H3><PRE>public void <B>send</B>(<A HREF="../../javax/jms/Message.html" title="interface in javax.jms">Message</A> message) throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Sends a message to the queue. Uses the <CODE>QueueSender</CODE>'s default delivery mode, priority, and time to live.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../javax/jms/MessageProducer.html#send(javax.jms.Message)">send</A></CODE> in interface <CODE><A HREF="../../javax/jms/MessageProducer.html" title="interface in javax.jms">MessageProducer</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>message</CODE> - the message to send<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 send the message due to some internal error.<DD><CODE><A HREF="../../javax/jms/MessageFormatException.html" title="class in javax.jms">MessageFormatException</A></CODE> - if an invalid message is specified.<DD><CODE><A HREF="../../javax/jms/InvalidDestinationException.html" title="class in javax.jms">InvalidDestinationException</A></CODE> - if a client uses this method with a <CODE>QueueSender</CODE> with an invalid queue.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if a client uses this method with a <CODE>QueueSender</CODE> that did not specify a queue 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="send(javax.jms.Message, int, int, long)"><!-- --></A><H3>send</H3><PRE>public void <B>send</B>(<A HREF="../../javax/jms/Message.html" title="interface in javax.jms">Message</A> message, int deliveryMode, int priority, long timeToLive) throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Sends a message to the queue, specifying delivery mode, priority, and time to live.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../javax/jms/MessageProducer.html#send(javax.jms.Message, int, int, long)">send</A></CODE> in interface <CODE><A HREF="../../javax/jms/MessageProducer.html" title="interface in javax.jms">MessageProducer</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>message</CODE> - the message to send<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" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to send the message due to some internal error.<DD><CODE><A HREF="../../javax/jms/MessageFormatException.html" title="class in javax.jms">MessageFormatException</A></CODE> - if an invalid message is specified.<DD><CODE><A HREF="../../javax/jms/InvalidDestinationException.html" title="class in javax.jms">InvalidDestinationException</A></CODE> - if a client uses this method with a <CODE>QueueSender</CODE> with an invalid queue.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if a client uses this method with a <CODE>QueueSender</CODE> that did not specify a queue at creation time.<DT><B>See Also:</B><DD><A HREF="../../javax/jms/Session.html#createProducer(javax.jms.Destination)"><CODE>Session.createProducer(javax.jms.Destination)</CODE></A></DL></DD></DL><HR><A NAME="send(javax.jms.Queue, javax.jms.Message)"><!-- --></A><H3>send</H3><PRE>public void <B>send</B>(<A HREF="../../javax/jms/Queue.html" title="interface in javax.jms">Queue</A> queue, <A HREF="../../javax/jms/Message.html" title="interface in javax.jms">Message</A> message) throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Sends a message to a queue for an unidentified message producer. Uses the <CODE>QueueSender</CODE>'s default delivery mode, priority, and time to live. <P>Typically, a message producer is assigned a queue at creation time; however, the JMS API also supports unidentified message producers, which require that the queue be supplied every time a message is sent.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>queue</CODE> - the queue to send this message to<DD><CODE>message</CODE> - the message to send<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 send the message due to some internal error.<DD><CODE><A HREF="../../javax/jms/MessageFormatException.html" title="class in javax.jms">MessageFormatException</A></CODE> - if an invalid message is specified.<DD><CODE><A HREF="../../javax/jms/InvalidDestinationException.html" title="class in javax.jms">InvalidDestinationException</A></CODE> - if a client uses this method with an invalid queue.<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="send(javax.jms.Queue, javax.jms.Message, int, int, long)"><!-- --></A><H3>send</H3><PRE>public void <B>send</B>(<A HREF="../../javax/jms/Queue.html" title="interface in javax.jms">Queue</A> queue, <A HREF="../../javax/jms/Message.html" title="interface in javax.jms">Message</A> message, int deliveryMode, int priority, long timeToLive) throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Sends a message to a queue for an unidentified message producer, specifying delivery mode, priority and time to live. <P>Typically, a message producer is assigned a queue at creation time; however, the JMS API also supports unidentified message producers, which require that the queue be supplied every time a message is sent.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>queue</CODE> - the queue to send this message to<DD><CODE>message</CODE> - the message to send<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" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to send the message due to some internal error.<DD><CODE><A HREF="../../javax/jms/MessageFormatException.html" title="class in javax.jms">MessageFormatException</A></CODE> - if an invalid message is specified.<DD><CODE><A HREF="../../javax/jms/InvalidDestinationException.html" title="class in javax.jms">InvalidDestinationException</A></CODE> - if a client uses this method with an invalid queue.</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> </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>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"> <A HREF="../../javax/jms/QueueReceiver.html" title="interface in javax.jms"><B>PREV CLASS</B></A> <A HREF="../../javax/jms/QueueSession.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> <A HREF="QueueSender.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_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 + -