Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/activemq/message/ActiveMQTemporaryTopic.java


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.activemq.message;
20  
21  import javax.jms.TemporaryTopic;
22  
23  /**
24   * A <CODE>TemporaryTopic</CODE> object is a unique <CODE>Topic</CODE> object
25   * created for the duration of a <CODE>Connection</CODE>. It is a
26   * system-defined topic that can be consumed only by the
27   * <CODE>Connection</CODE> that created it.
28   * <p/>
29   * <P>A <CODE>TemporaryTopic</CODE> object can be created either at the
30   * <CODE>Session</CODE> or <CODE>TopicSession</CODE> level. Creating it at the
31   * <CODE>Session</CODE> level allows the <CODE>TemporaryTopic</CODE> to participate
32   * in the same transaction with objects from the PTP domain.
33   * If a <CODE>TemporaryTopic</CODE> is  created at the
34   * <CODE>TopicSession</CODE>, it will only
35   * be able participate in transactions with objects from the Pub/Sub domain.
36   *
37   * @see javax.jms.Session#createTemporaryTopic()
38   * @see javax.jms.TopicSession#createTemporaryTopic()
39   */
40  
41  public class ActiveMQTemporaryTopic extends ActiveMQTopic implements TemporaryTopic {
42  
43      private static final long serialVersionUID = 8331978134488919460L;
44  
45      /**
46       * Default constructor for an ActiveMQTemporaryTopic Destination
47       */
48      public ActiveMQTemporaryTopic() {
49          super();
50      }
51  
52      /**
53       * Construct a named ActiveMQTemporaryTopic Destination
54       *
55       * @param name
56       */
57  
58      public ActiveMQTemporaryTopic(String name) {
59          super(name);
60      }
61  
62      /**
63       * @return Returns the Destination type
64       */
65      public int getDestinationType() {
66          return ACTIVEMQ_TEMPORARY_TOPIC;
67      }    
68      
69      /**
70       * Returns true if a temporary Destination
71       *
72       * @return true/false
73       */
74  
75      public boolean isTemporary() {
76          return true;
77      }
78  
79  }