//
// JmsaTemporaryQueue.java - JMS Adapter TemporaryQueue
//
// JmsaD handles the "administered" object side of things.
// The queue name is the underlying queue name.
//

package nyangau.jmsadapter;

import javax.jms.*;

public class JmsaTemporaryQueue extends JmsaD implements TemporaryQueue
  {
  protected transient TemporaryQueue q;
  protected transient JmsaSession s;
  protected transient FlowProcessor fp;
//...sJmsaTemporaryQueue:2:
public JmsaTemporaryQueue(TemporaryQueue queue, JmsaSession sess, FlowProcessor flowproc)
  {
  super(null); // No properties, so toString() is going to be boring...
  q  = queue;
  s  = sess;
  fp = flowproc;
  }
//...e
//...sgetQueueName:2:
public String getQueueName()
  throws JMSException
  { return q.getQueueName(); }
//...e
//...sdelete:2:
// Note that people are lazy, they don't always call this.
// So when the session is closed, cleanup is done there too.

public void delete()
  throws JMSException
  {
  if ( s != null )
    s.forgetTemporaryQueue(this);
  q.delete();
  }
//...e
//...sgetDest:2:
public Destination getDest()
  throws JMSException
  { return q; }
//...e
  }
