001    package com.mockrunner.mock.jms;
002    
003    import javax.jms.JMSException;
004    import javax.jms.TemporaryTopic;
005    
006    /**
007     * Mock implementation of JMS <code>TemporaryTopic</code>.
008     */
009    public class MockTemporaryTopic extends MockTopic implements TemporaryTopic
010    {
011        private boolean deleted;
012        
013        public MockTemporaryTopic()
014        {
015            super("TemporaryTopic");
016            deleted = false;
017        }
018        
019        /**
020         * Returns if this temporary topic is deleted.
021         * @return <code>true</code> if this topic is deleted 
022         */
023        public boolean isDeleted()
024        {
025            return deleted;
026        }
027    
028        public void delete() throws JMSException
029        {
030            deleted = true;
031        }  
032    }