001 /**
002 * Licensed under the Apache License, Version 2.0 (the "License");
003 * you may not use this file except in compliance with the License.
004 * You may obtain a copy of the License at
005 *
006 * http://www.apache.org/licenses/LICENSE-2.0
007 *
008 * Unless required by applicable law or agreed to in writing, software
009 * distributed under the License is distributed on an "AS IS" BASIS,
010 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
011 * See the License for the specific language governing permissions and
012 * limitations under the License.
013 *
014 **/
015 package org.jencks.pool;
016
017 import javax.jms.QueueSender;
018 import javax.jms.Destination;
019 import javax.jms.JMSException;
020 import javax.jms.Queue;
021 import javax.jms.Message;
022
023 /**
024 * @version $Revision$
025 */
026 public class PooledQueueSender extends PooledProducer implements QueueSender
027 {
028 public PooledQueueSender(final QueueSender messageProducer,
029 final Destination destination) throws JMSException
030 {
031 super(messageProducer, destination);
032 }
033
034 public void send(final Queue queue, final Message message, final int i, final int i1, final long l)
035 throws JMSException
036 {
037 getQueueSender().send(queue, message, i, i1, l);
038 }
039
040 public void send(Queue queue, Message message) throws JMSException
041 {
042 getQueueSender().send(queue, message);
043 }
044
045 public Queue getQueue() throws JMSException
046 {
047 return getQueueSender().getQueue();
048 }
049
050
051 protected QueueSender getQueueSender()
052 {
053 return (QueueSender)getMessageProducer();
054 }
055
056 }