1 18 package org.apache.activemq.broker.region; 19 20 import java.io.IOException ; 21 22 import org.apache.activemq.broker.ConnectionContext; 23 import org.apache.activemq.command.ActiveMQDestination; 24 import org.apache.activemq.command.ConsumerInfo; 25 import org.apache.activemq.command.MessageAck; 26 import org.apache.activemq.command.MessageDispatchNotification; 27 import org.apache.activemq.command.MessagePull; 28 import org.apache.activemq.command.Response; 29 import org.apache.activemq.filter.MessageEvaluationContext; 30 31 import javax.jms.InvalidSelectorException ; 32 import javax.management.ObjectName ; 33 34 37 public interface Subscription extends SubscriptionRecovery { 38 39 45 void add(MessageReference node) throws Exception ; 46 47 53 void acknowledge(ConnectionContext context, final MessageAck ack) throws Exception ; 54 55 56 59 Response pullMessage(ConnectionContext context, MessagePull pull) throws Exception ; 60 61 68 boolean matches(MessageReference node, MessageEvaluationContext context) throws IOException ; 69 70 75 boolean matches(ActiveMQDestination destination); 76 77 83 void add(ConnectionContext context, Destination destination) throws Exception ; 84 85 90 void remove(ConnectionContext context, Destination destination) throws Exception ; 91 92 96 ConsumerInfo getConsumerInfo(); 97 98 102 void gc(); 103 104 109 void processMessageDispatchNotification(MessageDispatchNotification mdn) throws Exception ; 110 111 114 boolean isSlaveBroker(); 115 116 119 int getPendingQueueSize(); 120 121 124 int getDispatchedQueueSize(); 125 126 129 long getDispatchedCounter(); 130 131 134 long getEnqueueCounter(); 135 136 139 long getDequeueCounter(); 140 141 144 public String getSelector(); 145 146 150 public void setSelector(String selector) throws InvalidSelectorException , UnsupportedOperationException ; 151 152 155 public ObjectName getObjectName(); 156 157 160 public void setObjectName(ObjectName objectName); 161 162 165 public boolean isLowWaterMark(); 166 167 170 public boolean isHighWaterMark(); 171 172 176 public void updateConsumerPrefetch(int newPrefetch); 177 178 182 public void optimizePrefetch(); 183 184 187 public void destroy(); 188 189 192 int getPrefetchSize(); 193 194 200 public boolean isRecoveryRequired(); 201 202 } 203 | Popular Tags |