1 22 package org.jboss.resource.adapter.jms; 23 24 import java.util.Enumeration ; 25 26 import javax.jms.Destination ; 27 import javax.jms.JMSException ; 28 import javax.jms.Message ; 29 30 36 public class JmsMessage implements Message 37 { 38 39 Message message; 40 41 42 JmsSession session; 43 44 50 public JmsMessage(Message message, JmsSession session) 51 { 52 this.message = message; 53 this.session = session; 54 } 55 56 public void acknowledge() throws JMSException 57 { 58 session.getSession(); message.acknowledge(); 60 } 61 62 public void clearBody() throws JMSException 63 { 64 message.clearBody(); 65 } 66 67 public void clearProperties() throws JMSException 68 { 69 message.clearProperties(); 70 } 71 72 public boolean getBooleanProperty(String name) throws JMSException 73 { 74 return message.getBooleanProperty(name); 75 } 76 77 public byte getByteProperty(String name) throws JMSException 78 { 79 return message.getByteProperty(name); 80 } 81 82 public double getDoubleProperty(String name) throws JMSException 83 { 84 return message.getDoubleProperty(name); 85 } 86 87 public float getFloatProperty(String name) throws JMSException 88 { 89 return message.getFloatProperty(name); 90 } 91 92 public int getIntProperty(String name) throws JMSException 93 { 94 return message.getIntProperty(name); 95 } 96 97 public String getJMSCorrelationID() throws JMSException 98 { 99 return message.getJMSCorrelationID(); 100 } 101 102 public byte[] getJMSCorrelationIDAsBytes() throws JMSException 103 { 104 return message.getJMSCorrelationIDAsBytes(); 105 } 106 107 public int getJMSDeliveryMode() throws JMSException 108 { 109 return message.getJMSDeliveryMode(); 110 } 111 112 public Destination getJMSDestination() throws JMSException 113 { 114 return message.getJMSDestination(); 115 } 116 117 public long getJMSExpiration() throws JMSException 118 { 119 return message.getJMSExpiration(); 120 } 121 122 public String getJMSMessageID() throws JMSException 123 { 124 return message.getJMSMessageID(); 125 } 126 127 public int getJMSPriority() throws JMSException 128 { 129 return message.getJMSPriority(); 130 } 131 132 public boolean getJMSRedelivered() throws JMSException 133 { 134 return message.getJMSRedelivered(); 135 } 136 137 public Destination getJMSReplyTo() throws JMSException 138 { 139 return message.getJMSReplyTo(); 140 } 141 142 public long getJMSTimestamp() throws JMSException 143 { 144 return message.getJMSTimestamp(); 145 } 146 147 public String getJMSType() throws JMSException 148 { 149 return message.getJMSType(); 150 } 151 152 public long getLongProperty(String name) throws JMSException 153 { 154 return message.getLongProperty(name); 155 } 156 157 public Object getObjectProperty(String name) throws JMSException 158 { 159 return message.getObjectProperty(name); 160 } 161 162 public Enumeration getPropertyNames() throws JMSException 163 { 164 return message.getPropertyNames(); 165 } 166 167 public short getShortProperty(String name) throws JMSException 168 { 169 return message.getShortProperty(name); 170 } 171 172 public String getStringProperty(String name) throws JMSException 173 { 174 return message.getStringProperty(name); 175 } 176 177 public boolean propertyExists(String name) throws JMSException 178 { 179 return message.propertyExists(name); 180 } 181 182 public void setBooleanProperty(String name, boolean value) throws JMSException 183 { 184 message.setBooleanProperty(name, value); 185 } 186 187 public void setByteProperty(String name, byte value) throws JMSException 188 { 189 message.setByteProperty(name, value); 190 } 191 192 public void setDoubleProperty(String name, double value) throws JMSException 193 { 194 message.setDoubleProperty(name, value); 195 } 196 197 public void setFloatProperty(String name, float value) throws JMSException 198 { 199 message.setFloatProperty(name, value); 200 } 201 202 public void setIntProperty(String name, int value) throws JMSException 203 { 204 message.setIntProperty(name, value); 205 } 206 207 public void setJMSCorrelationID(String correlationID) throws JMSException 208 { 209 message.setJMSCorrelationID(correlationID); 210 } 211 212 public void setJMSCorrelationIDAsBytes(byte[] correlationID) throws JMSException 213 { 214 message.setJMSCorrelationIDAsBytes(correlationID); 215 } 216 217 public void setJMSDeliveryMode(int deliveryMode) throws JMSException 218 { 219 message.setJMSDeliveryMode(deliveryMode); 220 } 221 222 public void setJMSDestination(Destination destination) throws JMSException 223 { 224 message.setJMSDestination(destination); 225 } 226 227 public void setJMSExpiration(long expiration) throws JMSException 228 { 229 message.setJMSExpiration(expiration); 230 } 231 232 public void setJMSMessageID(String id) throws JMSException 233 { 234 message.setJMSMessageID(id); 235 } 236 237 public void setJMSPriority(int priority) throws JMSException 238 { 239 message.setJMSPriority(priority); 240 } 241 242 public void setJMSRedelivered(boolean redelivered) throws JMSException 243 { 244 message.setJMSRedelivered(redelivered); 245 } 246 247 public void setJMSReplyTo(Destination replyTo) throws JMSException 248 { 249 message.setJMSReplyTo(replyTo); 250 } 251 252 public void setJMSTimestamp(long timestamp) throws JMSException 253 { 254 message.setJMSTimestamp(timestamp); 255 } 256 257 public void setJMSType(String type) throws JMSException 258 { 259 message.setJMSType(type); 260 } 261 262 public void setLongProperty(String name, long value) throws JMSException 263 { 264 message.setLongProperty(name, value); 265 } 266 267 public void setObjectProperty(String name, Object value) throws JMSException 268 { 269 message.setObjectProperty(name, value); 270 } 271 272 public void setShortProperty(String name, short value) throws JMSException 273 { 274 message.setShortProperty(name, value); 275 } 276 277 public void setStringProperty(String name, String value) throws JMSException 278 { 279 message.setStringProperty(name, value); 280 } 281 282 public int hashCode() 283 { 284 return message.hashCode(); 285 } 286 287 public boolean equals(Object object) 288 { 289 if (object != null && object instanceof JmsMessage) 290 return message.equals(((JmsMessage) object).message); 291 else 292 return message.equals(object); 293 } 294 295 public String toString() 296 { 297 return message.toString(); 298 } 299 } 300 | Popular Tags |