//
// JmsaTemporaryTopic.java - JMS Adapter TemporaryTopic
//
// JmsaD handles the "administered" object side of things.
// The topic name is the underlying topic name.
//

package nyangau.jmsadapter;

import javax.jms.*;

public class JmsaTemporaryTopic extends JmsaD implements TemporaryTopic
  {
  protected transient TemporaryTopic t;
  protected transient JmsaSession s;
  protected transient FlowProcessor fp;
//...sJmsaTemporaryTopic:2:
public JmsaTemporaryTopic(TemporaryTopic topic, JmsaSession sess, FlowProcessor flowproc)
  {
  super(null); // No properties, so toString() is going to be boring...
  t  = topic;
  s  = sess;
  fp = flowproc;
  }
//...e
//...sgetTopicName:2:
public String getTopicName()
  throws JMSException
  { return t.getTopicName(); }
//...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.forgetTemporaryTopic(this);
  t.delete();
  }
//...e
//...sgetDest:2:
public Destination getDest()
  throws JMSException
  { return t; }
//...e
  }
