1 7 package org.jboss.jms; 8 9 import org.jboss.jms.util.JMSMap; 10 11 import javax.jms.JMSException ; 12 import javax.jms.MapMessage ; 13 import java.util.Enumeration ; 14 15 19 public class MapMessageImpl extends MessageImpl implements MapMessage 20 { 21 22 public MapMessageImpl() 23 { 24 super.type = MessageImpl.MAP_MESSAGE_NAME; 25 super.body = JMSMap.createInstance(MapMessage .class); 26 } 27 28 public void clearBody() 29 { 30 this.getBody().clear(); 31 this.setReadOnly(false); 32 } 33 34 private JMSMap getBody() 35 { 36 return (JMSMap) super.body; 37 } 38 39 public final boolean getBoolean(String name) throws JMSException 40 { 41 return this.getBody().getBoolean(name); 42 } 43 44 public final byte getByte(String name) throws JMSException 45 { 46 return this.getBody().getByte(name); 47 } 48 49 public final byte[] getBytes(String name) throws JMSException 50 { 51 return this.getBody().getBytes(name); 52 } 53 54 public final char getChar(String name) throws JMSException 55 { 56 return this.getBody().getChar(name); 57 } 58 59 public final double getDouble(String name) throws JMSException 60 { 61 return this.getBody().getDouble(name); 62 } 63 64 public final float getFloat(String name) throws JMSException 65 { 66 return this.getBody().getFloat(name); 67 } 68 69 public final int getInt(String name) throws JMSException 70 { 71 return this.getBody().getInt(name); 72 } 73 74 public final long getLong(String name) throws JMSException 75 { 76 return this.getBody().getLong(name); 77 } 78 79 public final Enumeration getMapNames() throws JMSException 80 { 81 return this.getBody().getMapNames(); 82 } 83 84 public final Object getObject(String name) throws JMSException 85 { 86 return this.getBody().getObject(name); 87 } 88 89 public final short getShort(String name) throws JMSException 90 { 91 return this.getBody().getShort(name); 92 } 93 94 public final String getString(String name) throws JMSException 95 { 96 return this.getBody().getString(name); 97 } 98 99 public final boolean itemExists(String name) throws JMSException 100 { 101 return this.getBody().itemExists(name); 102 } 103 104 public final void setBoolean(String name, boolean value) throws JMSException 105 { 106 super.throwExceptionIfReadOnly(); 107 this.getBody().setBoolean(name, value); 108 } 109 110 public final void setByte(String name, byte value) throws JMSException 111 { 112 super.throwExceptionIfReadOnly(); 113 this.getBody().setByte(name, value); 114 } 115 116 public final void setBytes(String name, byte[] value) throws JMSException 117 { 118 super.throwExceptionIfReadOnly(); 119 this.getBody().setBytes(name, value); 120 } 121 122 public final void setBytes(String name, byte[] value, int offset, int length) 123 throws JMSException 124 { 125 super.throwExceptionIfReadOnly(); 126 this.getBody().setBytes(name, value, offset, length); 127 } 128 129 public final void setChar(String name, char value) throws JMSException 130 { 131 super.throwExceptionIfReadOnly(); 132 this.getBody().setChar(name, value); 133 } 134 135 public final void setDouble(String name, double value) throws JMSException 136 { 137 super.throwExceptionIfReadOnly(); 138 this.setDouble(name, value); 139 } 140 141 public final void setFloat(String name, float value) throws JMSException 142 { 143 super.throwExceptionIfReadOnly(); 144 this.getBody().setFloat(name, value); 145 } 146 147 public final void setInt(String name, int value) throws JMSException 148 { 149 super.throwExceptionIfReadOnly(); 150 this.getBody().setInt(name, value); 151 } 152 153 public final void setLong(String name, long value) throws JMSException 154 { 155 super.throwExceptionIfReadOnly(); 156 this.getBody().setLong(name, value); 157 } 158 159 public final void setObject(String name, Object value) throws JMSException 160 { 161 super.throwExceptionIfReadOnly(); 162 this.getBody().setObject(name, name); 163 } 164 165 public final void setShort(String name, short value) throws JMSException 166 { 167 super.throwExceptionIfReadOnly(); 168 this.getBody().setShort(name, value); 169 } 170 171 public final void setString(String name, String value) throws JMSException 172 { 173 super.throwExceptionIfReadOnly(); 174 this.getBody().setString(name, value); 175 } 176 177 } | Popular Tags |