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.memory.UsageManager; 28 29 32 public class ProxyMessageStore implements MessageStore { 33 34 final MessageStore delegate; 35 36 public ProxyMessageStore(MessageStore delegate) { 37 this.delegate = delegate; 38 } 39 40 public MessageStore getDelegate() { 41 return delegate; 42 } 43 44 public void addMessage(ConnectionContext context, Message message) throws IOException { 45 delegate.addMessage(context, message); 46 } 47 public Message getMessage(MessageId identity) throws IOException { 48 return delegate.getMessage(identity); 49 } 50 public void recover(MessageRecoveryListener listener) throws Exception { 51 delegate.recover(listener); 52 } 53 public void removeAllMessages(ConnectionContext context) throws IOException { 54 delegate.removeAllMessages(context); 55 } 56 public void removeMessage(ConnectionContext context, MessageAck ack) throws IOException { 57 delegate.removeMessage(context, ack); 58 } 59 public void start() throws Exception { 60 delegate.start(); 61 } 62 public void stop() throws Exception { 63 delegate.stop(); 64 } 65 public ActiveMQDestination getDestination() { 66 return delegate.getDestination(); 67 } 68 69 public void setUsageManager(UsageManager usageManager) { 70 delegate.setUsageManager(usageManager); 71 } 72 73 74 public int getMessageCount() throws IOException { 75 return delegate.getMessageCount(); 76 } 77 78 79 public void recoverNextMessages(int maxReturned,MessageRecoveryListener listener) throws Exception { 80 delegate.recoverNextMessages(maxReturned,listener); 81 82 } 83 84 public void resetBatching(){ 85 delegate.resetBatching(); 86 87 } 88 } 89 | Popular Tags |