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

📄 connection.html

📁 j2ee api,很好的api。我这现在有
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<TD><CODE><B><A HREF="../../javax/jms/Connection.html#setClientID(java.lang.String)">setClientID</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;clientID)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the client identifier for this connection.   </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/jms/Connection.html#setExceptionListener(javax.jms.ExceptionListener)">setExceptionListener</A></B>(<A HREF="../../javax/jms/ExceptionListener.html" title="interface in javax.jms">ExceptionListener</A>&nbsp;listener)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets an exception listener for this connection. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/jms/Connection.html#start()">start</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Starts (or restarts) a connection's delivery of incoming messages. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/jms/Connection.html#stop()">stop</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Temporarily stops a connection's delivery of incoming messages. </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="createSession(boolean, int)"><!-- --></A><H3>createSession</H3><PRE>public <A HREF="../../javax/jms/Session.html" title="interface in javax.jms">Session</A> <B>createSession</B>(boolean&nbsp;transacted,                             int&nbsp;acknowledgeMode)                      throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Creates a <CODE>Session</CODE> object.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>transacted</CODE> - indicates whether the session is transacted<DD><CODE>acknowledgeMode</CODE> - indicates whether the consumer or the client will acknowledge any messages it receives; ignored if the session is transacted. Legal values are <code>Session.AUTO_ACKNOWLEDGE</code>,  <code>Session.CLIENT_ACKNOWLEDGE</code>, and  <code>Session.DUPS_OK_ACKNOWLEDGE</code>.<DT><B>Returns:</B><DD>a newly created  session<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the <CODE>Connection</CODE> object fails                         to create a session due to some internal error or                         lack of support for the specific transaction                         and acknowledgement mode.<DT><B>Since:</B></DT>  <DD>1.1</DD><DT><B>See Also:</B><DD><A HREF="../../javax/jms/Session.html#AUTO_ACKNOWLEDGE"><CODE>Session.AUTO_ACKNOWLEDGE</CODE></A>, <A HREF="../../javax/jms/Session.html#CLIENT_ACKNOWLEDGE"><CODE>Session.CLIENT_ACKNOWLEDGE</CODE></A>, <A HREF="../../javax/jms/Session.html#DUPS_OK_ACKNOWLEDGE"><CODE>Session.DUPS_OK_ACKNOWLEDGE</CODE></A></DL></DD></DL><HR><A NAME="getClientID()"><!-- --></A><H3>getClientID</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>getClientID</B>()                   throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Gets the client identifier for this connection.   <P>This value is specific to the JMS provider.  It is either preconfigured  by an administrator in a <CODE>ConnectionFactory</CODE> object or assigned dynamically by the application by calling the <code>setClientID</code> method.<P><DD><DL><DT><B>Returns:</B><DD>the unique client identifier<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 return                         the client ID for this connection due                         to some internal error.</DL></DD></DL><HR><A NAME="setClientID(java.lang.String)"><!-- --></A><H3>setClientID</H3><PRE>public void <B>setClientID</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;clientID)                 throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Sets the client identifier for this connection.   <P>The preferred way to assign a JMS client's client identifier is for it to be configured in a client-specific <CODE>ConnectionFactory</CODE> object and transparently assigned to the <CODE>Connection</CODE> object it creates.  <P>Alternatively, a client can set a connection's client identifier using a provider-specific value. The facility to set a connection's client identifier explicitly is not a mechanism for overriding the identifier that has been administratively configured. It is provided for the case where no administratively specified identifier exists. If one does exist, an attempt to change it by setting it must throw an <CODE>IllegalStateException</CODE>. If a client sets the client identifier explicitly, it must do so immediately after it creates the connection  and before any other action on the connection is taken. After this point, setting the client identifier is a programming error that should throw an <CODE>IllegalStateException</CODE>. <P>The purpose of the client identifier is to associate a connection and its objects with a state maintained on behalf of the client by a  provider. The only such state identified by the JMS API is that required to support durable subscriptions. <P>If another connection with the same <code>clientID</code> is already running when this method is called, the JMS provider should detect the duplicate ID and throw an <CODE>InvalidClientIDException</CODE>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>clientID</CODE> - the unique client identifier<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 client ID for this connection due                         to some internal error.<DD><CODE><A HREF="../../javax/jms/InvalidClientIDException.html" title="class in javax.jms">InvalidClientIDException</A></CODE> - if the JMS client specifies an                         invalid or duplicate client ID.<DD><CODE><A HREF="../../javax/jms/IllegalStateException.html" title="class in javax.jms">IllegalStateException</A></CODE> - if the JMS client attempts to set       a connection's client ID at the wrong time or       when it has been administratively configured.</DL></DD></DL><HR><A NAME="getMetaData()"><!-- --></A><H3>getMetaData</H3><PRE>public <A HREF="../../javax/jms/ConnectionMetaData.html" title="interface in javax.jms">ConnectionMetaData</A> <B>getMetaData</B>()                               throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Gets the metadata for this connection.<P><DD><DL><DT><B>Returns:</B><DD>the connection metadata<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 connection metadata for this connection.<DT><B>See Also:</B><DD><A HREF="../../javax/jms/ConnectionMetaData.html" title="interface in javax.jms"><CODE>ConnectionMetaData</CODE></A></DL></DD></DL><HR><A NAME="getExceptionListener()"><!-- --></A><H3>getExceptionListener</H3><PRE>public <A HREF="../../javax/jms/ExceptionListener.html" title="interface in javax.jms">ExceptionListener</A> <B>getExceptionListener</B>()                                       throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Gets the <CODE>ExceptionListener</CODE> object for this connection.  Not every <CODE>Connection</CODE> has an <CODE>ExceptionListener</CODE> associated with it.<P><DD><DL><DT><B>Returns:</B><DD>the <CODE>ExceptionListener</CODE> for this connection, or null.               if no <CODE>ExceptionListener</CODE> is associated              with this connection.<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 <CODE>ExceptionListener</CODE> for this                          connection.<DT><B>See Also:</B><DD><A HREF="../../javax/jms/Connection.html#setExceptionListener(javax.jms.ExceptionListener)"><CODE>setExceptionListener(javax.jms.ExceptionListener)</CODE></A></DL></DD></DL><HR><A NAME="setExceptionListener(javax.jms.ExceptionListener)"><!-- --></A><H3>setExceptionListener</H3><PRE>public void <B>setExceptionListener</B>(<A HREF="../../javax/jms/ExceptionListener.html" title="interface in javax.jms">ExceptionListener</A>&nbsp;listener)                          throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Sets an exception listener for this connection. <P>If a JMS provider detects a serious problem with a connection, it informs the connection's <CODE>ExceptionListener</CODE>, if one has been registered. It does this by calling the listener's <CODE>onException</CODE> method, passing it a <CODE>JMSException</CODE> object describing the problem. <P>An exception listener allows a client to be notified of a problem asynchronously. Some connections only consume messages, so they would have no other  way to learn their connection has failed. <P>A connection serializes execution of its <CODE>ExceptionListener</CODE>. <P>A JMS provider should attempt to resolve connection problems  itself before it notifies the client of them.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - the exception listener<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 exception listener for this connection.</DL></DD></DL><HR><A NAME="start()"><!-- --></A><H3>start</H3><PRE>public void <B>start</B>()           throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Starts (or restarts) a connection's delivery of incoming messages. A call to <CODE>start</CODE> on a connection that has already been started is ignored.<P><DD><DL>

⌨️ 快捷键说明

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