org.jboss.messaging.ra
Class JBMStreamMessage

java.lang.Object
  extended by org.jboss.messaging.ra.JBMMessage
      extended by org.jboss.messaging.ra.JBMStreamMessage
All Implemented Interfaces:
javax.jms.Message, javax.jms.StreamMessage

public class JBMStreamMessage
extends JBMMessage
implements javax.jms.StreamMessage

A wrapper for a message

Version:
$Revision: $
Author:
Adrian Brock, Jesper Pedersen

Field Summary
 
Fields inherited from class org.jboss.messaging.ra.JBMMessage
message, session
 
Fields inherited from interface javax.jms.Message
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE
 
Constructor Summary
JBMStreamMessage(javax.jms.StreamMessage message, JBMSession session)
          Create a new wrapper
 
Method Summary
 boolean readBoolean()
          Read
 byte readByte()
          Read
 int readBytes(byte[] value)
          Read
 char readChar()
          Read
 double readDouble()
          Read
 float readFloat()
          Read
 int readInt()
          Read
 long readLong()
          Read
 java.lang.Object readObject()
          Read
 short readShort()
          Read
 java.lang.String readString()
          Read
 void reset()
          Reset
 void writeBoolean(boolean value)
          Write
 void writeByte(byte value)
          Write
 void writeBytes(byte[] value)
          Write
 void writeBytes(byte[] value, int offset, int length)
          Write
 void writeChar(char value)
          Write
 void writeDouble(double value)
          Write
 void writeFloat(float value)
          Write
 void writeInt(int value)
          Write
 void writeLong(long value)
          Write
 void writeObject(java.lang.Object value)
          Write
 void writeShort(short value)
          Write
 void writeString(java.lang.String value)
          Write
 
Methods inherited from class org.jboss.messaging.ra.JBMMessage
acknowledge, clearBody, clearProperties, equals, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, hashCode, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.jms.Message
acknowledge, clearBody, 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

JBMStreamMessage

public JBMStreamMessage(javax.jms.StreamMessage message,
                        JBMSession session)
Create a new wrapper

Parameters:
message - the message
session - the session
Method Detail

readBoolean

public boolean readBoolean()
                    throws javax.jms.JMSException
Read

Specified by:
readBoolean in interface javax.jms.StreamMessage
Returns:
The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

readByte

public byte readByte()
              throws javax.jms.JMSException
Read

Specified by:
readByte in interface javax.jms.StreamMessage
Returns:
The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

readBytes

public int readBytes(byte[] value)
              throws javax.jms.JMSException
Read

Specified by:
readBytes in interface javax.jms.StreamMessage
Parameters:
value - The value
Returns:
The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

readChar

public char readChar()
              throws javax.jms.JMSException
Read

Specified by:
readChar in interface javax.jms.StreamMessage
Returns:
The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

readDouble

public double readDouble()
                  throws javax.jms.JMSException
Read

Specified by:
readDouble in interface javax.jms.StreamMessage
Returns:
The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

readFloat

public float readFloat()
                throws javax.jms.JMSException
Read

Specified by:
readFloat in interface javax.jms.StreamMessage
Returns:
The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

readInt

public int readInt()
            throws javax.jms.JMSException
Read

Specified by:
readInt in interface javax.jms.StreamMessage
Returns:
The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

readLong

public long readLong()
              throws javax.jms.JMSException
Read

Specified by:
readLong in interface javax.jms.StreamMessage
Returns:
The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

readObject

public java.lang.Object readObject()
                            throws javax.jms.JMSException
Read

Specified by:
readObject in interface javax.jms.StreamMessage
Returns:
The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

readShort

public short readShort()
                throws javax.jms.JMSException
Read

Specified by:
readShort in interface javax.jms.StreamMessage
Returns:
The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

readString

public java.lang.String readString()
                            throws javax.jms.JMSException
Read

Specified by:
readString in interface javax.jms.StreamMessage
Returns:
The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

reset

public void reset()
           throws javax.jms.JMSException
Reset

Specified by:
reset in interface javax.jms.StreamMessage
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeBoolean

public void writeBoolean(boolean value)
                  throws javax.jms.JMSException
Write

Specified by:
writeBoolean in interface javax.jms.StreamMessage
Parameters:
value - The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeByte

public void writeByte(byte value)
               throws javax.jms.JMSException
Write

Specified by:
writeByte in interface javax.jms.StreamMessage
Parameters:
value - The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeBytes

public void writeBytes(byte[] value,
                       int offset,
                       int length)
                throws javax.jms.JMSException
Write

Specified by:
writeBytes in interface javax.jms.StreamMessage
Parameters:
value - The value
offset - The offset
length - The length
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeBytes

public void writeBytes(byte[] value)
                throws javax.jms.JMSException
Write

Specified by:
writeBytes in interface javax.jms.StreamMessage
Parameters:
value - The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeChar

public void writeChar(char value)
               throws javax.jms.JMSException
Write

Specified by:
writeChar in interface javax.jms.StreamMessage
Parameters:
value - The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeDouble

public void writeDouble(double value)
                 throws javax.jms.JMSException
Write

Specified by:
writeDouble in interface javax.jms.StreamMessage
Parameters:
value - The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeFloat

public void writeFloat(float value)
                throws javax.jms.JMSException
Write

Specified by:
writeFloat in interface javax.jms.StreamMessage
Parameters:
value - The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeInt

public void writeInt(int value)
              throws javax.jms.JMSException
Write

Specified by:
writeInt in interface javax.jms.StreamMessage
Parameters:
value - The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeLong

public void writeLong(long value)
               throws javax.jms.JMSException
Write

Specified by:
writeLong in interface javax.jms.StreamMessage
Parameters:
value - The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeObject

public void writeObject(java.lang.Object value)
                 throws javax.jms.JMSException
Write

Specified by:
writeObject in interface javax.jms.StreamMessage
Parameters:
value - The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeShort

public void writeShort(short value)
                throws javax.jms.JMSException
Write

Specified by:
writeShort in interface javax.jms.StreamMessage
Parameters:
value - The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeString

public void writeString(java.lang.String value)
                 throws javax.jms.JMSException
Write

Specified by:
writeString in interface javax.jms.StreamMessage
Parameters:
value - The value
Throws:
javax.jms.JMSException - Thrown if an error occurs


Copyright © 2006 JBoss Inc. All Rights Reserved.