1 18 package org.apache.activemq.broker.region; 19 20 import java.io.IOException ; 21 22 import org.apache.activemq.command.ActiveMQMessage; 23 import org.apache.activemq.command.ConsumerId; 24 import org.apache.activemq.command.Message; 25 import org.apache.activemq.command.MessageId; 26 27 30 final class NullMessageReference implements 31 QueueMessageReference { 32 33 private ActiveMQMessage message = new ActiveMQMessage(); 34 private volatile int references; 35 36 public void drop() { 37 throw new RuntimeException ("not implemented"); 38 } 39 40 public LockOwner getLockOwner() { 41 throw new RuntimeException ("not implemented"); 42 } 43 44 public boolean isAcked() { 45 return false; 46 } 47 48 public boolean isDropped() { 49 throw new RuntimeException ("not implemented"); 50 } 51 52 public boolean lock(LockOwner subscription) { 53 return true; 54 } 55 56 public void setAcked(boolean b) { 57 throw new RuntimeException ("not implemented"); 58 } 59 60 public void unlock() { 61 } 62 63 public int decrementReferenceCount() { 64 return --references; 65 } 66 67 public long getExpiration() { 68 throw new RuntimeException ("not implemented"); 69 } 70 71 public String getGroupID() { 72 return null; 73 } 74 75 public int getGroupSequence() { 76 return 0; 77 } 78 79 public Message getMessage() throws IOException { 80 return message; 81 } 82 83 public Message getMessageHardRef() { 84 throw new RuntimeException ("not implemented"); 85 } 86 87 public MessageId getMessageId() { 88 return message.getMessageId(); 89 } 90 91 public int getRedeliveryCounter() { 92 throw new RuntimeException ("not implemented"); 93 } 94 95 public int getReferenceCount() { 96 return references; 97 } 98 99 public Destination getRegionDestination() { 100 return null; 101 } 102 103 public int getSize() { 104 throw new RuntimeException ("not implemented"); 105 } 106 107 public ConsumerId getTargetConsumerId() { 108 throw new RuntimeException ("not implemented"); 109 } 110 111 public void incrementRedeliveryCounter() { 112 throw new RuntimeException ("not implemented"); 113 } 114 115 public int incrementReferenceCount() { 116 return ++references; 117 } 118 119 public boolean isExpired() { 120 throw new RuntimeException ("not implemented"); 121 } 122 123 public boolean isPersistent() { 124 throw new RuntimeException ("not implemented"); 125 } 126 127 } 128 | Popular Tags |