//
// JmsaTopicSession.java - JMS Adapter TopicSession
//

package nyangau.jmsadapter;

import javax.jms.*;

public class JmsaTopicSession extends JmsaSession implements TopicSession
  {
//...sJmsaTopicSession:2:
public JmsaTopicSession(TopicSession sess, JmsaConnection conn, FlowProcessor flowproc)
  { super(sess, conn, flowproc); }
//...e

//...screateBrowser        \45\ forbidden:2:
public QueueBrowser createBrowser(Queue queue)
  throws JMSException
  { throw new javax.jms.IllegalStateException("forbidden by JMS spec"); }

public QueueBrowser createBrowser(Queue queue, String messageSelector)
  throws JMSException
  { throw new javax.jms.IllegalStateException("forbidden by JMS spec"); }
//...e
//...screateQueue          \45\ forbidden:2:
public Queue createQueue(String queueName)
  throws JMSException
  { throw new javax.jms.IllegalStateException("forbidden by JMS spec"); }
//...e
//...screateTemporaryQueue \45\ forbidden:2:
public TemporaryQueue createTemporaryQueue()
  throws JMSException
  { throw new javax.jms.IllegalStateException("forbidden by JMS spec"); }
//...e

//...screatePublisher:2:
public TopicPublisher createPublisher(Topic topic)
  throws JMSException
  {
  return new JmsaTopicPublisher(
    ((TopicSession)s).createPublisher( (Topic)(((JmsaTopic)topic).getDest()) ),
    topic,
    fp
    );
  }
//...e
//...screateSubscriber:2:
public TopicSubscriber createSubscriber(Topic topic)
  throws JMSException
  {
  return new JmsaTopicSubscriber(
    ((TopicSession)s).createSubscriber( (Topic)(((JmsaTopic)topic).getDest()) ),
    fp
    );
  }

public TopicSubscriber createSubscriber(Topic topic, String messageSelector, boolean noLocal)
  throws JMSException
  {
  return new JmsaTopicSubscriber(
    ((TopicSession)s).createSubscriber( (Topic)(((JmsaTopic)topic).getDest()), messageSelector, noLocal ),
    fp
    );
  }
//...e
  }
