001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.resource.adapter.jms;
023:
024: import java.util.Enumeration;
025:
026: import javax.jms.JMSException;
027: import javax.jms.MapMessage;
028:
029: /**
030: * A wrapper for a message
031: *
032: * @author <a href="mailto:adrian@jboss.com">Adrian Brock</a>
033: * @version $Revision: 57189 $
034: */
035: public class JmsMapMessage extends JmsMessage implements MapMessage {
036: /**
037: * Create a new wrapper
038: *
039: * @param message the message
040: * @param session the session
041: */
042: public JmsMapMessage(MapMessage message, JmsSession session) {
043: super (message, session);
044: }
045:
046: public boolean getBoolean(String name) throws JMSException {
047: return ((MapMessage) message).getBoolean(name);
048: }
049:
050: public byte getByte(String name) throws JMSException {
051: return ((MapMessage) message).getByte(name);
052: }
053:
054: public byte[] getBytes(String name) throws JMSException {
055: return ((MapMessage) message).getBytes(name);
056: }
057:
058: public char getChar(String name) throws JMSException {
059: return ((MapMessage) message).getChar(name);
060: }
061:
062: public double getDouble(String name) throws JMSException {
063: return ((MapMessage) message).getDouble(name);
064: }
065:
066: public float getFloat(String name) throws JMSException {
067: return ((MapMessage) message).getFloat(name);
068: }
069:
070: public int getInt(String name) throws JMSException {
071: return ((MapMessage) message).getInt(name);
072: }
073:
074: public long getLong(String name) throws JMSException {
075: return ((MapMessage) message).getLong(name);
076: }
077:
078: public Enumeration getMapNames() throws JMSException {
079: return ((MapMessage) message).getMapNames();
080: }
081:
082: public Object getObject(String name) throws JMSException {
083: return ((MapMessage) message).getObject(name);
084: }
085:
086: public short getShort(String name) throws JMSException {
087: return ((MapMessage) message).getShort(name);
088: }
089:
090: public String getString(String name) throws JMSException {
091: return ((MapMessage) message).getString(name);
092: }
093:
094: public boolean itemExists(String name) throws JMSException {
095: return ((MapMessage) message).itemExists(name);
096: }
097:
098: public void setBoolean(String name, boolean value)
099: throws JMSException {
100: ((MapMessage) message).setBoolean(name, value);
101: }
102:
103: public void setByte(String name, byte value) throws JMSException {
104: ((MapMessage) message).setByte(name, value);
105: }
106:
107: public void setBytes(String name, byte[] value, int offset,
108: int length) throws JMSException {
109: ((MapMessage) message).setBytes(name, value, offset, length);
110: }
111:
112: public void setBytes(String name, byte[] value) throws JMSException {
113: ((MapMessage) message).setBytes(name, value);
114: }
115:
116: public void setChar(String name, char value) throws JMSException {
117: ((MapMessage) message).setChar(name, value);
118: }
119:
120: public void setDouble(String name, double value)
121: throws JMSException {
122: ((MapMessage) message).setDouble(name, value);
123: }
124:
125: public void setFloat(String name, float value) throws JMSException {
126: ((MapMessage) message).setFloat(name, value);
127: }
128:
129: public void setInt(String name, int value) throws JMSException {
130: ((MapMessage) message).setInt(name, value);
131: }
132:
133: public void setLong(String name, long value) throws JMSException {
134: ((MapMessage) message).setLong(name, value);
135: }
136:
137: public void setObject(String name, Object value)
138: throws JMSException {
139: ((MapMessage) message).setObject(name, value);
140: }
141:
142: public void setShort(String name, short value) throws JMSException {
143: ((MapMessage) message).setShort(name, value);
144: }
145:
146: public void setString(String name, String value)
147: throws JMSException {
148: ((MapMessage) message).setString(name, value);
149: }
150: }
|