1 46 package org.mr.api.jms; 47 48 import javax.jms.Destination ; 49 50 import javax.jms.JMSException ; 51 52 import javax.jms.TopicSubscriber ; 53 54 import org.mr.kernel.services.ServiceConsumer; 55 import java.io.Serializable ; 56 57 65 public class MantaTopicSubscriber extends MantaMessageConsumer implements Serializable , TopicSubscriber { 66 67 81 public MantaTopicSubscriber(String clientID, MantaSession sess, 82 Destination destination,boolean noLocal, 83 boolean isDurableSubscriber,String durableSubscriberName, 84 ServiceConsumer service) throws JMSException { 85 86 super(clientID, sess,destination,null,noLocal,service); 87 88 this.isDurableSubscriber = isDurableSubscriber; 89 this.durableSubscriberName = durableSubscriberName; 90 } 92 105 public MantaTopicSubscriber(String clientID, MantaSession sess, Destination destination, boolean noLocal,boolean isDurableSubscriber,String durableSubscriberName, String messageSelector,ServiceConsumer service) throws JMSException { 106 super(clientID, sess,destination,messageSelector,noLocal,service); 107 108 this.isDurableSubscriber = isDurableSubscriber; 109 this.durableSubscriberName = durableSubscriberName; 110 } 112 113 114 private boolean isDurableSubscriber = false; 116 117 118 private String durableSubscriberName = null; 122 123 124 125 126 protected String getDurableSubscriberName() { 127 return durableSubscriberName; 128 } 129 protected boolean isDurableSubscriber() { 130 return isDurableSubscriber; 131 } 132 } | Popular Tags |