com.caucho.jms.message
Class MapMessageImpl

java.lang.Object
  extended by com.caucho.jms.message.MessageImpl
      extended by com.caucho.jms.message.MapMessageImpl
All Implemented Interfaces:
java.io.Serializable, MapMessage, Message

public class MapMessageImpl
extends MessageImpl
implements MapMessage

A stream message.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.caucho.jms.message.MessageImpl
L, log
 
Fields inherited from interface javax.jms.Message
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE
 
Constructor Summary
MapMessageImpl()
           
 
Method Summary
 java.io.InputStream bodyToInputStream()
          Serialize the body to an input stream.
 void clearBody()
          Clears the message and puts it into write mode.
 MessageImpl copy()
           
protected  void copy(MapMessageImpl newMsg)
           
 boolean getBoolean(java.lang.String name)
          Get a boolean from the stream.
 byte getByte(java.lang.String name)
          Get a byte from the stream.
 byte[] getBytes(java.lang.String name)
          Get a byte array object from the stream.
 int getBytes(java.lang.String name, byte[] value)
          Get a byte array object from the stream.
 char getChar(java.lang.String name)
          Get a character object from the stream.
 double getDouble(java.lang.String name)
          Get a double from the stream.
 float getFloat(java.lang.String name)
          Get a float from the stream.
 int getInt(java.lang.String name)
          Get an integer from the stream.
 long getLong(java.lang.String name)
          Get a long from the stream.
 java.util.Enumeration getMapNames()
          Returns an enumeration of the map names.
 java.lang.Object getObject(java.lang.String name)
          Gets the next object.
 short getShort(java.lang.String name)
          Get a short from the stream.
 java.lang.String getString(java.lang.String name)
          Get a string from the stream.
 MessageType getType()
          Returns the type enumeration.
 boolean itemExists(java.lang.String name)
          Returns true if the object exists.
 void readBody(java.io.InputStream is)
          Read the body from an input stream.
 void setBoolean(java.lang.String name, boolean b)
          Sets a boolean to the stream.
 void setByte(java.lang.String name, byte b)
          Sets a byte to the stream.
 void setBytes(java.lang.String name, byte[] buf)
          Sets a byte array to the stream.
 void setBytes(java.lang.String name, byte[] buf, int offset, int length)
          Sets a byte array to the stream.
 void setChar(java.lang.String name, char ch)
          Sets a character to the stream.
 void setDouble(java.lang.String name, double d)
          Sets a double to the stream.
 void setFloat(java.lang.String name, float f)
          Sets a float to the stream.
 void setInt(java.lang.String name, int i)
          Sets an integer to the stream.
 void setLong(java.lang.String name, long l)
          Sets a long to the stream.
 void setObject(java.lang.String name, java.lang.Object obj)
          Sets the next object.
 void setShort(java.lang.String name, short s)
          Sets a short to the stream.
 void setString(java.lang.String name, java.lang.String s)
          Sets a string to the stream.
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.jms.message.MessageImpl
acknowledge, checkBodyReadable, checkBodyWriteable, checkHeaderWriteable, checkPropertyWriteable, clearProperties, copy, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getProperties, getPropertyNames, getSequence, getShortProperty, getStringProperty, isReserved, propertiesToInputStream, propertyExists, readProperties, setBodyReadOnly, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setReceive, setSequence, setSession, setShortProperty, setStringProperty, writeBody, writeProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.jms.Message
acknowledge, clearProperties, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty
 

Constructor Detail

MapMessageImpl

public MapMessageImpl()
Method Detail

getType

public MessageType getType()
Returns the type enumeration.

Overrides:
getType in class MessageImpl

itemExists

public boolean itemExists(java.lang.String name)
                   throws JMSException
Returns true if the object exists.

Specified by:
itemExists in interface MapMessage
Throws:
JMSException

getMapNames

public java.util.Enumeration getMapNames()
                                  throws JMSException
Returns an enumeration of the map names.

Specified by:
getMapNames in interface MapMessage
Throws:
JMSException

getBoolean

public boolean getBoolean(java.lang.String name)
                   throws JMSException
Get a boolean from the stream.

Specified by:
getBoolean in interface MapMessage
Throws:
JMSException

getByte

public byte getByte(java.lang.String name)
             throws JMSException
Get a byte from the stream.

Specified by:
getByte in interface MapMessage
Throws:
JMSException

getShort

public short getShort(java.lang.String name)
               throws JMSException
Get a short from the stream.

Specified by:
getShort in interface MapMessage
Throws:
JMSException

getInt

public int getInt(java.lang.String name)
           throws JMSException
Get an integer from the stream.

Specified by:
getInt in interface MapMessage
Throws:
JMSException

getLong

public long getLong(java.lang.String name)
             throws JMSException
Get a long from the stream.

Specified by:
getLong in interface MapMessage
Throws:
JMSException

getFloat

public float getFloat(java.lang.String name)
               throws JMSException
Get a float from the stream.

Specified by:
getFloat in interface MapMessage
Throws:
JMSException

getDouble

public double getDouble(java.lang.String name)
                 throws JMSException
Get a double from the stream.

Specified by:
getDouble in interface MapMessage
Throws:
JMSException

getChar

public char getChar(java.lang.String name)
             throws JMSException
Get a character object from the stream.

Specified by:
getChar in interface MapMessage
Throws:
JMSException

getString

public java.lang.String getString(java.lang.String name)
                           throws JMSException
Get a string from the stream.

Specified by:
getString in interface MapMessage
Throws:
JMSException

getBytes

public byte[] getBytes(java.lang.String name)
                throws JMSException
Get a byte array object from the stream.

Specified by:
getBytes in interface MapMessage
Throws:
JMSException

getBytes

public int getBytes(java.lang.String name,
                    byte[] value)
             throws JMSException
Get a byte array object from the stream.

Throws:
JMSException

getObject

public java.lang.Object getObject(java.lang.String name)
                           throws JMSException
Gets the next object.

Specified by:
getObject in interface MapMessage
Throws:
JMSException

clearBody

public void clearBody()
               throws JMSException
Clears the message and puts it into write mode.

Specified by:
clearBody in interface Message
Overrides:
clearBody in class MessageImpl
Throws:
JMSException

setBoolean

public void setBoolean(java.lang.String name,
                       boolean b)
                throws JMSException
Sets a boolean to the stream.

Specified by:
setBoolean in interface MapMessage
Throws:
JMSException

setByte

public void setByte(java.lang.String name,
                    byte b)
             throws JMSException
Sets a byte to the stream.

Specified by:
setByte in interface MapMessage
Throws:
JMSException

setShort

public void setShort(java.lang.String name,
                     short s)
              throws JMSException
Sets a short to the stream.

Specified by:
setShort in interface MapMessage
Throws:
JMSException

setInt

public void setInt(java.lang.String name,
                   int i)
            throws JMSException
Sets an integer to the stream.

Specified by:
setInt in interface MapMessage
Throws:
JMSException

setLong

public void setLong(java.lang.String name,
                    long l)
             throws JMSException
Sets a long to the stream.

Specified by:
setLong in interface MapMessage
Throws:
JMSException

setFloat

public void setFloat(java.lang.String name,
                     float f)
              throws JMSException
Sets a float to the stream.

Specified by:
setFloat in interface MapMessage
Throws:
JMSException

setDouble

public void setDouble(java.lang.String name,
                      double d)
               throws JMSException
Sets a double to the stream.

Specified by:
setDouble in interface MapMessage
Throws:
JMSException

setString

public void setString(java.lang.String name,
                      java.lang.String s)
               throws JMSException
Sets a string to the stream.

Specified by:
setString in interface MapMessage
Throws:
JMSException

setChar

public void setChar(java.lang.String name,
                    char ch)
             throws JMSException
Sets a character to the stream.

Specified by:
setChar in interface MapMessage
Throws:
JMSException

setBytes

public void setBytes(java.lang.String name,
                     byte[] buf)
              throws JMSException
Sets a byte array to the stream.

Specified by:
setBytes in interface MapMessage
Throws:
JMSException

setBytes

public void setBytes(java.lang.String name,
                     byte[] buf,
                     int offset,
                     int length)
              throws JMSException
Sets a byte array to the stream.

Specified by:
setBytes in interface MapMessage
Throws:
JMSException

setObject

public void setObject(java.lang.String name,
                      java.lang.Object obj)
               throws JMSException
Sets the next object.

Specified by:
setObject in interface MapMessage
Throws:
JMSException

copy

public MessageImpl copy()
Overrides:
copy in class MessageImpl

copy

protected void copy(MapMessageImpl newMsg)

bodyToInputStream

public java.io.InputStream bodyToInputStream()
                                      throws java.io.IOException
Serialize the body to an input stream.

Overrides:
bodyToInputStream in class MessageImpl
Throws:
java.io.IOException

readBody

public void readBody(java.io.InputStream is)
              throws java.io.IOException,
                     JMSException
Read the body from an input stream.

Overrides:
readBody in class MessageImpl
Throws:
java.io.IOException
JMSException

toString

public java.lang.String toString()
Overrides:
toString in class MessageImpl