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

📄 session.html

📁 j2ee api,很好的api。我这现在有
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>destination</CODE> - the <CODE>Destination</CODE> to access.<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the session fails to create a consumer                         due to some internal error.<DD><CODE><A HREF="../../javax/jms/InvalidDestinationException.html" title="class in javax.jms">InvalidDestinationException</A></CODE> - if an invalid destination                          is specified.<DT><B>Since:</B></DT>  <DD>1.1</DD></DL></DD></DL><HR><A NAME="createConsumer(javax.jms.Destination, java.lang.String)"><!-- --></A><H3>createConsumer</H3><PRE>public <A HREF="../../javax/jms/MessageConsumer.html" title="interface in javax.jms">MessageConsumer</A> <B>createConsumer</B>(<A HREF="../../javax/jms/Destination.html" title="interface in javax.jms">Destination</A>&nbsp;destination,                                      <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;messageSelector)                               throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Creates a <CODE>MessageConsumer</CODE> for the specified destination,  using a message selector.  Since <CODE>Queue</CODE> and <CODE>Topic</CODE>  both inherit from <CODE>Destination</CODE>, they can be used in the destination parameter to create a <CODE>MessageConsumer</CODE>. <P>A client uses a <CODE>MessageConsumer</CODE> object to receive  messages that have been sent to a destination.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>destination</CODE> - the <CODE>Destination</CODE> to access<DD><CODE>messageSelector</CODE> - only messages with properties matching the message selector expression are delivered. A value of null or an empty string indicates that there is no message selector  for the message consumer.<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the session fails to create a MessageConsumer                         due to some internal error.<DD><CODE><A HREF="../../javax/jms/InvalidDestinationException.html" title="class in javax.jms">InvalidDestinationException</A></CODE> - if an invalid destination is specified.<DD><CODE><A HREF="../../javax/jms/InvalidSelectorException.html" title="class in javax.jms">InvalidSelectorException</A></CODE> - if the message selector is invalid.<DT><B>Since:</B></DT>  <DD>1.1</DD></DL></DD></DL><HR><A NAME="createConsumer(javax.jms.Destination, java.lang.String, boolean)"><!-- --></A><H3>createConsumer</H3><PRE>public <A HREF="../../javax/jms/MessageConsumer.html" title="interface in javax.jms">MessageConsumer</A> <B>createConsumer</B>(<A HREF="../../javax/jms/Destination.html" title="interface in javax.jms">Destination</A>&nbsp;destination,                                      <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;messageSelector,                                      boolean&nbsp;NoLocal)                               throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Creates <CODE>MessageConsumer</CODE> for the specified destination, using a message selector. This method can specify whether messages published by  its own connection should be delivered to it, if the destination is a  topic. <P> Since <CODE>Queue</CODE> and <CODE>Topic</CODE>  both inherit from <CODE>Destination</CODE>, they can be used in the destination parameter to create a <CODE>MessageConsumer</CODE>. <P>A client uses a <CODE>MessageConsumer</CODE> object to receive  messages that have been published to a destination.                 <P>In some cases, a connection may both publish and subscribe to a  topic. The consumer <CODE>NoLocal</CODE> attribute allows a consumer to inhibit the delivery of messages published by its own connection. The default value for this attribute is False. The <CODE>noLocal</CODE>  value must be supported by destinations that are topics.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>destination</CODE> - the <CODE>Destination</CODE> to access<DD><CODE>messageSelector</CODE> - only messages with properties matching the message selector expression are delivered. A value of null or an empty string indicates that there is no message selector  for the message consumer.<DD><CODE>NoLocal</CODE> - - if true, and the destination is a topic,                   inhibits the delivery of messages published                   by its own connection.  The behavior for                   <CODE>NoLocal</CODE> is                    not specified if the destination is a queue.<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the session fails to create a MessageConsumer                         due to some internal error.<DD><CODE><A HREF="../../javax/jms/InvalidDestinationException.html" title="class in javax.jms">InvalidDestinationException</A></CODE> - if an invalid destination is specified.<DD><CODE><A HREF="../../javax/jms/InvalidSelectorException.html" title="class in javax.jms">InvalidSelectorException</A></CODE> - if the message selector is invalid.<DT><B>Since:</B></DT>  <DD>1.1</DD></DL></DD></DL><HR><A NAME="createQueue(java.lang.String)"><!-- --></A><H3>createQueue</H3><PRE>public <A HREF="../../javax/jms/Queue.html" title="interface in javax.jms">Queue</A> <B>createQueue</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;queueName)                  throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Creates a queue identity given a <CODE>Queue</CODE> name. <P>This facility is provided for the rare cases where clients need to dynamically manipulate queue identity. It allows the creation of a queue identity with a provider-specific name. Clients that depend  on this ability are not portable. <P>Note that this method is not for creating the physical queue.  The physical creation of queues is an administrative task and is not to be initiated by the JMS API. The one exception is the creation of temporary queues, which is accomplished with the  <CODE>createTemporaryQueue</CODE> method.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>queueName</CODE> - the name of this <CODE>Queue</CODE><DT><B>Returns:</B><DD>a <CODE>Queue</CODE> with the given name<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the session fails to create a queue                         due to some internal error.<DT><B>Since:</B></DT>  <DD>1.1</DD></DL></DD></DL><HR><A NAME="createTopic(java.lang.String)"><!-- --></A><H3>createTopic</H3><PRE>public <A HREF="../../javax/jms/Topic.html" title="interface in javax.jms">Topic</A> <B>createTopic</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;topicName)                  throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Creates a topic identity given a <CODE>Topic</CODE> name. <P>This facility is provided for the rare cases where clients need to dynamically manipulate topic identity. This allows the creation of a topic identity with a provider-specific name. Clients that depend  on this ability are not portable. <P>Note that this method is not for creating the physical topic.  The physical creation of topics is an administrative task and is not to be initiated by the JMS API. The one exception is the creation of temporary topics, which is accomplished with the  <CODE>createTemporaryTopic</CODE> method.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>topicName</CODE> - the name of this <CODE>Topic</CODE><DT><B>Returns:</B><DD>a <CODE>Topic</CODE> with the given name<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the session fails to create a topic                         due to some internal error.<DT><B>Since:</B></DT>  <DD>1.1</DD></DL></DD></DL><HR><A NAME="createDurableSubscriber(javax.jms.Topic, java.lang.String)"><!-- --></A><H3>createDurableSubscriber</H3><PRE>public <A HREF="../../javax/jms/TopicSubscriber.html" title="interface in javax.jms">TopicSubscriber</A> <B>createDurableSubscriber</B>(<A HREF="../../javax/jms/Topic.html" title="interface in javax.jms">Topic</A>&nbsp;topic,                                               <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;name)                                        throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Creates a durable subscriber to the specified topic.   <P>If a client needs to receive all the messages published on a  topic, including the ones published while the subscriber is inactive, it uses a durable <CODE>TopicSubscriber</CODE>. The JMS provider retains a record of this  durable subscription and insures that all messages from the topic's  publishers are retained until they are acknowledged by this  durable subscriber or they have expired. <P>Sessions with durable subscribers must always provide the same  client identifier. In addition, each client must specify a name that  uniquely identifies (within client identifier) each durable  subscription it creates. Only one session at a time can have a  <CODE>TopicSubscriber</CODE> for a particular durable subscription. <P>A client can change an existing durable subscription by creating  a durable <CODE>TopicSubscriber</CODE> with the same name and a new  topic and/or  message selector. Changing a durable subscriber is equivalent to  unsubscribing (deleting) the old one and creating a new one. <P>In some cases, a connection may both publish and subscribe to a  topic. The subscriber <CODE>NoLocal</CODE> attribute allows a subscriber to inhibit the delivery of messages published by its own connection. The default value for this attribute is false.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>topic</CODE> - the non-temporary <CODE>Topic</CODE> to subscribe to<DD><CODE>name</CODE> - the name used to identify this subscription<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the session fails to create a subscriber                         due to some internal error.<DD><CODE><A HREF="../../javax/jms/InvalidDestinationException.html" title="class in javax.jms">InvalidDestinationException</A></CODE> - if an invalid topic is specified.<DT><B>Since:</B></DT>  <DD>1.1</DD></DL></DD></DL><HR><A NAME="createDurableSubscriber(javax.jms.Topic, java.lang.String, java.lang.String, boolean)"><!-- --></A><H3>createDurableSubscriber</H3><PRE>public <A HREF="../../javax/jms/TopicSubscriber.html" title="interface in javax.jms">TopicSubscriber</A> <B>createDurableSubscriber</B>(<A HREF="../../javax/jms/Topic.html" title="interface in javax.jms">Topic</A>&nbsp;topic,                                               <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;name,                                               <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;messageSelector,                                               boolean&nbsp;noLocal)                                        throws <A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></PRE><DL><DD>Creates a durable subscriber to the specified topic, using a message selector and specifying whether messages published by its own connection should be delivered to it.   <P>If a client needs to receive all the messages published on a  topic, including the ones published while the subscriber is inactive, it uses a durable <CODE>TopicSubscriber</CODE>. The JMS provider retains a record of this  durable subscription and insures that all messages from the topic's  publishers are retained until they are acknowledged by this  durable subscriber or they have expired. <P>Sessions with durable subscribers must always provide the same client identifier. In addition, each client must specify a name which uniquely identifies (within client identifier) each durable subscription it creates. Only one session at a time can have a <CODE>TopicSubscriber</CODE> for a particular durable subscription. An inactive durable subscriber is one that exists but does not currently have a message consumer associated with it. <P>A client can change an existing durable subscription by creating  a durable <CODE>TopicSubscriber</CODE> with the same name and a new  topic and/or  message selector. Changing a durable subscriber is equivalent to  unsubscribing (deleting) the old one and creating a new one.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>topic</CODE> - the non-temporary <CODE>Topic</CODE> to subscribe to<DD><CODE>name</CODE> - the name used to identify this subscription<DD><CODE>messageSelector</CODE> - only messages with properties matching the message selector expression are delivered.  A value of null or an empty string indicates that there is no message selector  for the message consumer.<DD><CODE>noLocal</CODE> - if set, inhibits the delivery of messages published by its own connection<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the session fails to create a subscriber                         due to some internal error.<DD><CODE><A HREF="../../javax/jms/InvalidDestinationException.html" title="class in javax.jms">InvalidDestinationException</A></CODE> - if an invalid topic is specified.<DD><CODE><A HREF="../../javax/jms/InvalidSelectorException.html" title="class in javax.jms">InvalidSelectorException</A></CODE> - if the message selector is invalid.<DT><B>Since:</B></DT>  <DD>1.1</DD></DL></DD></DL><HR><A NAME="createBrowser(javax.jms.Queue)"><!-- --></A><H3>createBrowser</H3><PRE>public <A HREF="../../javax/jms/QueueBrowser.html" ti

⌨️ 快捷键说明

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