1 /* 2 * The contents of this file are subject to the terms 3 * of the Common Development and Distribution License 4 * (the License). You may not use this file except in 5 * compliance with the License. 6 * 7 * You can obtain a copy of the license at 8 * https://glassfish.dev.java.net/public/CDDLv1.0.html or 9 * glassfish/bootstrap/legal/CDDLv1.0.txt. 10 * See the License for the specific language governing 11 * permissions and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL 14 * Header Notice in each file and include the License file 15 * at glassfish/bootstrap/legal/CDDLv1.0.txt. 16 * If applicable, add the following below the CDDL Header, 17 * with the fields enclosed by brackets [] replaced by 18 * you own identifying information: 19 * "Portions Copyrighted [year] [name of copyright owner]" 20 * 21 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 22 */ 23 24 25 package javax.jms; 26 27 /** A <CODE>TemporaryTopic</CODE> object is a unique <CODE>Topic</CODE> object 28 * created for the duration of a <CODE>Connection</CODE>. It is a 29 * system-defined topic that can be consumed only by the 30 * <CODE>Connection</CODE> that created it. 31 * 32 *<P>A <CODE>TemporaryTopic</CODE> object can be created either at the 33 * <CODE>Session</CODE> or <CODE>TopicSession</CODE> level. Creating it at the 34 * <CODE>Session</CODE> level allows the <CODE>TemporaryTopic</CODE> to participate 35 * in the same transaction with objects from the PTP domain. 36 * If a <CODE>TemporaryTopic</CODE> is created at the 37 * <CODE>TopicSession</CODE>, it will only 38 * be able participate in transactions with objects from the Pub/Sub domain. 39 * 40 * @version 1.1 - February 2, 2002 41 * @author Mark Hapner 42 * @author Rich Burridge 43 * @author Kate Stout 44 * 45 * @see Session#createTemporaryTopic() 46 * @see TopicSession#createTemporaryTopic() 47 */ 48 49 public interface TemporaryTopic extends Topic { 50 51 /** Deletes this temporary topic. If there are existing subscribers 52 * still using it, a <CODE>JMSException</CODE> will be thrown. 53 * 54 * @exception JMSException if the JMS provider fails to delete the 55 * temporary topic due to some internal error. 56 */ 57 58 void 59 delete() throws JMSException; 60 } 61