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