View Javadoc

    1   /***
    2    *
    3    * Copyright 2004 Protique Ltd
    4    *
    5    * Licensed under the Apache License, Version 2.0 (the "License");
    6    * you may not use this file except in compliance with the License.
    7    * You may obtain a copy of the License at
    8    *
    9    * http://www.apache.org/licenses/LICENSE-2.0
    10   *
    11   * Unless required by applicable law or agreed to in writing, software
    12   * distributed under the License is distributed on an "AS IS" BASIS,
    13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14   * See the License for the specific language governing permissions and
    15   * limitations under the License.
    16   *
    17   **/
    18
    19  package org.codehaus.activemq.message;
    20
    21  import javax.jms.JMSException;
    22  import javax.jms.TemporaryQueue;
    23
    24
    25  /***
    26   * A <CODE>TemporaryQueue</CODE> object is a unique <CODE>Queue</CODE> object
    27   * created for the duration of a <CODE>Connection</CODE>. It is a
    28   * system-defined queue that can be consumed only by the
    29   * <CODE>Connection</CODE> that created it.
    30   * <p/>
    31   * <P>A <CODE>TemporaryQueue</CODE> object can be created at either the
    32   * <CODE>Session</CODE> or <CODE>QueueSession</CODE> level. Creating it at the
    33   * <CODE>Session</CODE> level allows to the <CODE>TemporaryQueue</CODE> to
    34   * participate in transactions with objects from the Pub/Sub  domain.
    35   * If it is created at the <CODE>QueueSession</CODE>, it will only
    36   * be able participate in transactions with objects from the PTP domain.
    37   *
    38   * @see javax.jms.Session#createTemporaryQueue()
    39   * @see javax.jms.QueueSession#createTemporaryQueue()
    40   */
    41
    42  public class ActiveMQTemporaryQueue extends ActiveMQQueue implements TemporaryQueue {
    43
    44      /***
    45       * Default constructor for an ActiveMQTemporaryQueue Destination
    46       */
    47      public ActiveMQTemporaryQueue() {
    48          super();
    49      }
    50
    51      /***
    52       * Construct a named ActiveMQTemporaryQueue Destination
    53       *
    54       * @param name
    55       */
    56
    57      public ActiveMQTemporaryQueue(String name) {
    58          super(name);
    59      }
    60
    61      /***
    62       * Deletes this temporary queue. If there are existing receivers
    63       * still using it, a <CODE>JMSException</CODE> will be thrown.
    64       *
    65       * @throws JMSException if the JMS provider fails to delete the
    66       *                      temporary queue due to some internal error.
    67       */
    68
    69      public void delete() throws JMSException {
    70      }
    71
    72      /***
    73       * @return Returns the Destination type
    74       */
    75
    76      public int getDestinationType() {
    77          return ACTIVEMQ_TEMPORARY_QUEUE;
    78      }
    79  }