1 18 package org.apache.activemq.store; 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.Message; 25 import org.apache.activemq.command.MessageAck; 26 import org.apache.activemq.command.MessageId; 27 import org.apache.activemq.command.SubscriptionInfo; 28 import org.apache.activemq.memory.UsageManager; 29 30 33 public class ProxyTopicMessageStore implements TopicMessageStore { 34 35 final TopicMessageStore delegate; 36 37 public ProxyTopicMessageStore(TopicMessageStore delegate) { 38 this.delegate = delegate; 39 } 40 41 public MessageStore getDelegate() { 42 return delegate; 43 } 44 45 public void addMessage(ConnectionContext context, Message message) throws IOException { 46 delegate.addMessage(context, message); 47 } 48 public Message getMessage(MessageId identity) throws IOException { 49 return delegate.getMessage(identity); 50 } 51 public void recover(MessageRecoveryListener listener) throws Exception { 52 delegate.recover(listener); 53 } 54 public void removeAllMessages(ConnectionContext context) throws IOException { 55 delegate.removeAllMessages(context); 56 } 57 public void removeMessage(ConnectionContext context, MessageAck ack) throws IOException { 58 delegate.removeMessage(context, ack); 59 } 60 public void start() throws Exception { 61 delegate.start(); 62 } 63 public void stop() throws Exception { 64 delegate.stop(); 65 } 66 67 public SubscriptionInfo lookupSubscription(String clientId, String subscriptionName) throws IOException { 68 return delegate.lookupSubscription(clientId, subscriptionName); 69 } 70 public void acknowledge(ConnectionContext context, String clientId, String subscriptionName, MessageId messageId) 71 throws IOException { 72 delegate.acknowledge(context, clientId, subscriptionName, messageId); 73 } 74 public void addSubsciption(String clientId, String subscriptionName, String selector, boolean retroactive) throws IOException { 75 delegate.addSubsciption(clientId, subscriptionName, selector, retroactive); 76 } 77 public void deleteSubscription(String clientId, String subscriptionName) throws IOException { 78 delegate.deleteSubscription(clientId, subscriptionName); 79 } 80 81 public void recoverSubscription(String clientId, String subscriptionName, MessageRecoveryListener listener) throws Exception { 82 delegate.recoverSubscription(clientId, subscriptionName, listener); 83 } 84 85 public void recoverNextMessages(String clientId,String subscriptionName,int maxReturned,MessageRecoveryListener listener) throws Exception { 86 delegate.recoverNextMessages(clientId, subscriptionName, maxReturned,listener); 87 } 88 89 public void resetBatching(String clientId,String subscriptionName) { 90 delegate.resetBatching(clientId,subscriptionName); 91 } 92 93 94 public ActiveMQDestination getDestination() { 95 return delegate.getDestination(); 96 } 97 98 public SubscriptionInfo[] getAllSubscriptions() throws IOException { 99 return delegate.getAllSubscriptions(); 100 } 101 102 public void setUsageManager(UsageManager usageManager) { 103 delegate.setUsageManager(usageManager); 104 } 105 106 public int getMessageCount(String clientId,String subscriberName) throws IOException { 107 return delegate.getMessageCount(clientId,subscriberName); 108 } 109 110 111 public int getMessageCount() throws IOException { 112 return delegate.getMessageCount(); 113 } 114 115 public void recoverNextMessages(int maxReturned,MessageRecoveryListener listener) throws Exception { 116 delegate.recoverNextMessages(maxReturned,listener); 117 118 } 119 120 public void resetBatching(){ 121 delegate.resetBatching(); 122 123 } 124 } 125 | Popular Tags |