KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > resource > adapter > jms > JmsMapMessage


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2005, JBoss Inc., and individual contributors as indicated
4 * by the @authors tag. See the copyright.txt in the distribution for a
5 * full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this software; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 */

22 package org.jboss.resource.adapter.jms;
23
24 import java.util.Enumeration JavaDoc;
25
26 import javax.jms.JMSException JavaDoc;
27 import javax.jms.MapMessage JavaDoc;
28
29 /**
30  * A wrapper for a message
31  *
32  * @author <a HREF="mailto:adrian@jboss.com">Adrian Brock</a>
33  * @version $Revision: 38315 $
34  */

35 public class JmsMapMessage extends JmsMessage implements MapMessage JavaDoc
36 {
37    /**
38     * Create a new wrapper
39     *
40     * @param message the message
41     * @param session the session
42     */

43    public JmsMapMessage(MapMessage JavaDoc message, JmsSession session)
44    {
45       super(message, session);
46    }
47
48    public boolean getBoolean(String JavaDoc name) throws JMSException JavaDoc
49    {
50       return ((MapMessage JavaDoc) message).getBoolean(name);
51    }
52    
53    public byte getByte(String JavaDoc name) throws JMSException JavaDoc
54    {
55       return ((MapMessage JavaDoc) message).getByte(name);
56    }
57
58    public byte[] getBytes(String JavaDoc name) throws JMSException JavaDoc
59    {
60       return ((MapMessage JavaDoc) message).getBytes(name);
61    }
62
63    public char getChar(String JavaDoc name) throws JMSException JavaDoc
64    {
65       return ((MapMessage JavaDoc) message).getChar(name);
66    }
67
68    public double getDouble(String JavaDoc name) throws JMSException JavaDoc
69    {
70       return ((MapMessage JavaDoc) message).getDouble(name);
71    }
72
73    public float getFloat(String JavaDoc name) throws JMSException JavaDoc
74    {
75       return ((MapMessage JavaDoc) message).getFloat(name);
76    }
77    
78    public int getInt(String JavaDoc name) throws JMSException JavaDoc
79    {
80       return ((MapMessage JavaDoc) message).getInt(name);
81    }
82
83    public long getLong(String JavaDoc name) throws JMSException JavaDoc
84    {
85       return ((MapMessage JavaDoc) message).getLong(name);
86    }
87
88    public Enumeration JavaDoc getMapNames() throws JMSException JavaDoc
89    {
90       return ((MapMessage JavaDoc) message).getMapNames();
91    }
92
93    public Object JavaDoc getObject(String JavaDoc name) throws JMSException JavaDoc
94    {
95       return ((MapMessage JavaDoc) message).getObject(name);
96    }
97
98    public short getShort(String JavaDoc name) throws JMSException JavaDoc
99    {
100       return ((MapMessage JavaDoc) message).getShort(name);
101    }
102
103    public String JavaDoc getString(String JavaDoc name) throws JMSException JavaDoc
104    {
105       return ((MapMessage JavaDoc) message).getString(name);
106    }
107
108    public boolean itemExists(String JavaDoc name) throws JMSException JavaDoc
109    {
110       return ((MapMessage JavaDoc) message).itemExists(name);
111    }
112
113    public void setBoolean(String JavaDoc name, boolean value) throws JMSException JavaDoc
114    {
115       ((MapMessage JavaDoc) message).setBoolean(name, value);
116    }
117
118    public void setByte(String JavaDoc name, byte value) throws JMSException JavaDoc
119    {
120       ((MapMessage JavaDoc) message).setByte(name, value);
121    }
122
123    public void setBytes(String JavaDoc name, byte[] value, int offset, int length) throws JMSException JavaDoc
124    {
125       ((MapMessage JavaDoc) message).setBytes(name, value, offset, length);
126    }
127
128    public void setBytes(String JavaDoc name, byte[] value) throws JMSException JavaDoc
129    {
130       ((MapMessage JavaDoc) message).setBytes(name, value);
131    }
132
133    public void setChar(String JavaDoc name, char value) throws JMSException JavaDoc
134    {
135       ((MapMessage JavaDoc) message).setChar(name, value);
136    }
137
138    public void setDouble(String JavaDoc name, double value) throws JMSException JavaDoc
139    {
140       ((MapMessage JavaDoc) message).setDouble(name, value);
141    }
142
143    public void setFloat(String JavaDoc name, float value) throws JMSException JavaDoc
144    {
145       ((MapMessage JavaDoc) message).setFloat(name, value);
146    }
147
148    public void setInt(String JavaDoc name, int value) throws JMSException JavaDoc
149    {
150       ((MapMessage JavaDoc) message).setInt(name, value);
151    }
152
153    public void setLong(String JavaDoc name, long value) throws JMSException JavaDoc
154    {
155       ((MapMessage JavaDoc) message).setLong(name, value);
156    }
157    
158    public void setObject(String JavaDoc name, Object JavaDoc value) throws JMSException JavaDoc
159    {
160       ((MapMessage JavaDoc) message).setObject(name, value);
161    }
162    
163    public void setShort(String JavaDoc name, short value) throws JMSException JavaDoc
164    {
165       ((MapMessage JavaDoc) message).setShort(name, value);
166    }
167
168    public void setString(String JavaDoc name, String JavaDoc value) throws JMSException JavaDoc
169    {
170       ((MapMessage JavaDoc) message).setString(name, value);
171    }
172 }
173
Popular Tags