1 18 package org.apache.activemq.broker; 19 20 import org.apache.activemq.broker.region.Destination; 21 import org.apache.activemq.broker.region.Subscription; 22 import org.apache.activemq.broker.region.policy.PendingDurableSubscriberMessageStoragePolicy; 23 import org.apache.activemq.command.ActiveMQDestination; 24 import org.apache.activemq.command.BrokerId; 25 import org.apache.activemq.command.BrokerInfo; 26 import org.apache.activemq.command.ConnectionInfo; 27 import org.apache.activemq.command.ConsumerInfo; 28 import org.apache.activemq.command.DestinationInfo; 29 import org.apache.activemq.command.Message; 30 import org.apache.activemq.command.MessageAck; 31 import org.apache.activemq.command.MessageDispatch; 32 import org.apache.activemq.command.MessageDispatchNotification; 33 import org.apache.activemq.command.MessagePull; 34 import org.apache.activemq.command.ProducerInfo; 35 import org.apache.activemq.command.RemoveSubscriptionInfo; 36 import org.apache.activemq.command.Response; 37 import org.apache.activemq.command.SessionInfo; 38 import org.apache.activemq.command.TransactionId; 39 import org.apache.activemq.kaha.Store; 40 41 import java.net.URI ; 42 import java.util.Map ; 43 import java.util.Set ; 44 45 51 public class BrokerFilter implements Broker { 52 53 final protected Broker next; 54 55 public BrokerFilter(Broker next) { 56 this.next=next; 57 } 58 59 public Broker getAdaptor(Class type){ 60 if (type.isInstance(this)){ 61 return this; 62 } 63 return next.getAdaptor(type); 64 } 65 66 public Map getDestinationMap() { 67 return next.getDestinationMap(); 68 } 69 70 public Set getDestinations(ActiveMQDestination destination) { 71 return next.getDestinations(destination); 72 } 73 74 public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception { 75 next.acknowledge(consumerExchange, ack); 76 } 77 78 public Response messagePull(ConnectionContext context, MessagePull pull) throws Exception { 79 return next.messagePull(context, pull); 80 } 81 82 public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception { 83 next.addConnection(context, info); 84 } 85 86 public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception { 87 return next.addConsumer(context, info); 88 } 89 90 public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception { 91 next.addProducer(context, info); 92 } 93 94 public void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws Exception { 95 next.commitTransaction(context, xid, onePhase); 96 } 97 98 public void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info) throws Exception { 99 next.removeSubscription(context, info); 100 } 101 102 public TransactionId[] getPreparedTransactions(ConnectionContext context) throws Exception { 103 return next.getPreparedTransactions(context); 104 } 105 106 public int prepareTransaction(ConnectionContext context, TransactionId xid) throws Exception { 107 return next.prepareTransaction(context, xid); 108 } 109 110 public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception { 111 next.removeConnection(context, info, error); 112 } 113 114 public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception { 115 next.removeConsumer(context, info); 116 } 117 118 public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception { 119 next.removeProducer(context, info); 120 } 121 122 public void rollbackTransaction(ConnectionContext context, TransactionId xid) throws Exception { 123 next.rollbackTransaction(context, xid); 124 } 125 126 public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception { 127 next.send(producerExchange, messageSend); 128 } 129 130 public void beginTransaction(ConnectionContext context, TransactionId xid) throws Exception { 131 next.beginTransaction(context, xid); 132 } 133 134 public void forgetTransaction(ConnectionContext context, TransactionId transactionId) throws Exception { 135 next.forgetTransaction(context, transactionId); 136 } 137 138 public Connection[] getClients() throws Exception { 139 return next.getClients(); 140 } 141 142 public Destination addDestination(ConnectionContext context, ActiveMQDestination destination) throws Exception { 143 return next.addDestination(context, destination); 144 } 145 146 public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception { 147 next.removeDestination(context, destination, timeout); 148 } 149 150 public ActiveMQDestination[] getDestinations() throws Exception { 151 return next.getDestinations(); 152 } 153 154 public void start() throws Exception { 155 next.start(); 156 } 157 158 public void stop() throws Exception { 159 next.stop(); 160 } 161 162 public void addSession(ConnectionContext context, SessionInfo info) throws Exception { 163 next.addSession(context, info); 164 } 165 166 public void removeSession(ConnectionContext context, SessionInfo info) throws Exception { 167 next.removeSession(context, info); 168 } 169 170 public BrokerId getBrokerId() { 171 return next.getBrokerId(); 172 } 173 174 public String getBrokerName() { 175 return next.getBrokerName(); 176 } 177 178 public void gc() { 179 next.gc(); 180 } 181 182 183 public void addBroker(Connection connection,BrokerInfo info){ 184 next.addBroker(connection, info); 185 } 186 187 public void removeBroker(Connection connection,BrokerInfo info){ 188 next.removeBroker(connection, info); 189 } 190 191 192 public BrokerInfo[] getPeerBrokerInfos(){ 193 return next.getPeerBrokerInfos(); 194 } 195 196 public void processDispatch(MessageDispatch messageDispatch){ 197 next.processDispatch(messageDispatch); 198 } 199 200 public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws Exception { 201 next.processDispatchNotification(messageDispatchNotification); 202 } 203 204 public boolean isSlaveBroker(){ 205 return next.isSlaveBroker(); 206 } 207 208 public boolean isStopped(){ 209 return next.isStopped(); 210 } 211 212 public Set getDurableDestinations(){ 213 return next.getDurableDestinations(); 214 } 215 216 public void addDestinationInfo(ConnectionContext context,DestinationInfo info) throws Exception { 217 next.addDestinationInfo(context, info); 218 219 } 220 221 public void removeDestinationInfo(ConnectionContext context,DestinationInfo info) throws Exception { 222 next.removeDestinationInfo(context, info); 223 224 } 225 226 public boolean isFaultTolerantConfiguration(){ 227 return next.isFaultTolerantConfiguration(); 228 } 229 230 public ConnectionContext getAdminConnectionContext() { 231 return next.getAdminConnectionContext(); 232 } 233 234 public void setAdminConnectionContext(ConnectionContext adminConnectionContext) { 235 next.setAdminConnectionContext(adminConnectionContext); 236 } 237 238 public Store getTempDataStore() { 239 return next.getTempDataStore(); 240 } 241 242 public URI getVmConnectorURI(){ 243 return next.getVmConnectorURI(); 244 } 245 246 } 247 | Popular Tags |