Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/activemq/pool/PooledTopicPublisher.java


1   /** 
2    * 
3    * Copyright 2005 Protique Ltd
4    * 
5    * Licensed under the Apache License, Version 2.0 (the "License"); 
6    * you may not use this file except in compliance with the License. 
7    * You may obtain a copy of the License at 
8    * 
9    * http://www.apache.org/licenses/LICENSE-2.0
10   * 
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS, 
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
14   * See the License for the specific language governing permissions and 
15   * limitations under the License. 
16   * 
17   **/
18  package org.activemq.pool;
19  
20  import org.activemq.ActiveMQTopicPublisher;
21  
22  import javax.jms.Destination;
23  import javax.jms.JMSException;
24  import javax.jms.Message;
25  import javax.jms.Topic;
26  import javax.jms.TopicPublisher;
27  
28  /**
29   * @version $Revision: 1.1 $
30   */
31  public class PooledTopicPublisher extends PooledProducer implements TopicPublisher {
32  
33      public PooledTopicPublisher(ActiveMQTopicPublisher messageProducer, Destination destination) throws JMSException {
34          super(messageProducer, destination);
35      }
36  
37      public Topic getTopic() throws JMSException {
38          return getTopicPublisher().getTopic();
39      }
40  
41      public void publish(Message message) throws JMSException {
42          getTopicPublisher().publish(message);
43      }
44  
45      public void publish(Message message, int i, int i1, long l) throws JMSException {
46          getTopicPublisher().publish(message, i, i1, l);
47      }
48  
49      public void publish(Topic topic, Message message) throws JMSException {
50          getTopicPublisher().publish(topic, message);
51      }
52  
53      public void publish(Topic topic, Message message, int i, int i1, long l) throws JMSException {
54          getTopicPublisher().publish(topic, message, i, i1, l);
55      }
56  
57      protected ActiveMQTopicPublisher getTopicPublisher() {
58          return (ActiveMQTopicPublisher) getMessageProducer();
59      }
60  }