org.apache.qpid.client.message
Class JMSStreamMessage

java.lang.Object
  extended by org.apache.qpid.client.message.AbstractJMSMessage
      extended by org.apache.qpid.client.message.AbstractBytesMessage
          extended by org.apache.qpid.client.message.AbstractBytesTypedMessage
              extended by org.apache.qpid.client.message.JMSStreamMessage
All Implemented Interfaces:
Message, StreamMessage

public class JMSStreamMessage
extends AbstractBytesTypedMessage
implements StreamMessage


Field Summary
static String MIME_TYPE
           
 
Fields inherited from class org.apache.qpid.client.message.AbstractBytesTypedMessage
BOOLEAN_TYPE, BYTE_TYPE, BYTEARRAY_TYPE, CHAR_TYPE, DOUBLE_TYPE, FLOAT_TYPE, INT_TYPE, LONG_TYPE, NULL_STRING_TYPE, SHORT_TYPE, STRING_TYPE
 
Fields inherited from class org.apache.qpid.client.message.AbstractJMSMessage
_changedData, _data, _delegate, _readableMessage
 
Fields inherited from interface javax.jms.Message
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE
 
Fields inherited from interface org.apache.qpid.jms.Message
JMS_TYPE
 
Constructor Summary
JMSStreamMessage(AMQMessageDelegate delegate, org.apache.mina.common.ByteBuffer data)
           
JMSStreamMessage(AMQMessageDelegateFactory delegateFactory)
           
JMSStreamMessage(AMQMessageDelegateFactory delegateFactory, org.apache.mina.common.ByteBuffer data)
          Construct a stream message with existing data.
 
Method Summary
protected  String getMimeType()
           
 boolean readBoolean()
           
 byte readByte()
           
 int readBytes(byte[] bytes)
           
 char readChar()
          Note that this method reads a unicode character as two bytes from the stream
 double readDouble()
           
 float readFloat()
           
 int readInt()
           
 long readLong()
           
 Object readObject()
           
 short readShort()
           
 String readString()
           
 void reset()
           
 void writeBoolean(boolean b)
           
 void writeByte(byte b)
           
 void writeBytes(byte[] bytes)
           
 void writeBytes(byte[] bytes, int offset, int length)
           
 void writeChar(char c)
           
 void writeDouble(double v)
           
 void writeFloat(float v)
           
 void writeInt(int i)
           
 void writeLong(long l)
           
 void writeObject(Object object)
           
 void writeShort(short i)
           
 void writeString(String string)
           
 
Methods inherited from class org.apache.qpid.client.message.AbstractBytesTypedMessage
readIntImpl, readStringImpl, readWireType, writeIntImpl, writeStringImpl, writeTypeDiscriminator
 
Methods inherited from class org.apache.qpid.client.message.AbstractBytesMessage
allocateInitialBuffer, checkAvailable, clearBodyImpl, toBodyString
 
Methods inherited from class org.apache.qpid.client.message.AbstractJMSMessage
acknowledge, acknowledgeThis, checkReadable, checkWritable, clearBody, clearProperties, getAMQSession, getBooleanProperty, getByteProperty, getContentLength, getContentType, getData, getDelegate, getDeliveryTag, getDoubleProperty, getEncoding, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getReplyToString, getShortProperty, getStringProperty, prepareForSending, propertyExists, receivedFromServer, removeProperty, setAMQSession, setBooleanProperty, setByteProperty, setContentType, setDoubleProperty, setEncoding, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty, toString
 
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, 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
 

Field Detail

MIME_TYPE

public static final String MIME_TYPE
See Also:
Constant Field Values
Constructor Detail

JMSStreamMessage

public JMSStreamMessage(AMQMessageDelegateFactory delegateFactory)

JMSStreamMessage

JMSStreamMessage(AMQMessageDelegateFactory delegateFactory,
                 org.apache.mina.common.ByteBuffer data)
Construct a stream message with existing data.

Parameters:
delegateFactory -
data - the data that comprises this message. If data is null, you get a 1024 byte buffer that is

JMSStreamMessage

JMSStreamMessage(AMQMessageDelegate delegate,
                 org.apache.mina.common.ByteBuffer data)
           throws org.apache.qpid.AMQException
Throws:
org.apache.qpid.AMQException
Method Detail

reset

public void reset()
Specified by:
reset in interface StreamMessage
Overrides:
reset in class AbstractJMSMessage

getMimeType

protected String getMimeType()
Specified by:
getMimeType in class AbstractJMSMessage

readBoolean

public boolean readBoolean()
                    throws JMSException
Specified by:
readBoolean in interface StreamMessage
Overrides:
readBoolean in class AbstractBytesTypedMessage
Throws:
JMSException

readByte

public byte readByte()
              throws JMSException
Specified by:
readByte in interface StreamMessage
Overrides:
readByte in class AbstractBytesTypedMessage
Throws:
JMSException

readShort

public short readShort()
                throws JMSException
Specified by:
readShort in interface StreamMessage
Overrides:
readShort in class AbstractBytesTypedMessage
Throws:
JMSException

readChar

public char readChar()
              throws JMSException
Note that this method reads a unicode character as two bytes from the stream

Specified by:
readChar in interface StreamMessage
Overrides:
readChar in class AbstractBytesTypedMessage
Returns:
the character read from the stream
Throws:
JMSException

readInt

public int readInt()
            throws JMSException
Specified by:
readInt in interface StreamMessage
Overrides:
readInt in class AbstractBytesTypedMessage
Throws:
JMSException

readLong

public long readLong()
              throws JMSException
Specified by:
readLong in interface StreamMessage
Overrides:
readLong in class AbstractBytesTypedMessage
Throws:
JMSException

readFloat

public float readFloat()
                throws JMSException
Specified by:
readFloat in interface StreamMessage
Overrides:
readFloat in class AbstractBytesTypedMessage
Throws:
JMSException

readDouble

public double readDouble()
                  throws JMSException
Specified by:
readDouble in interface StreamMessage
Overrides:
readDouble in class AbstractBytesTypedMessage
Throws:
JMSException

readString

public String readString()
                  throws JMSException
Specified by:
readString in interface StreamMessage
Overrides:
readString in class AbstractBytesTypedMessage
Throws:
JMSException

readBytes

public int readBytes(byte[] bytes)
              throws JMSException
Specified by:
readBytes in interface StreamMessage
Overrides:
readBytes in class AbstractBytesTypedMessage
Throws:
JMSException

readObject

public Object readObject()
                  throws JMSException
Specified by:
readObject in interface StreamMessage
Overrides:
readObject in class AbstractBytesTypedMessage
Throws:
JMSException

writeBoolean

public void writeBoolean(boolean b)
                  throws JMSException
Specified by:
writeBoolean in interface StreamMessage
Overrides:
writeBoolean in class AbstractBytesTypedMessage
Throws:
JMSException

writeByte

public void writeByte(byte b)
               throws JMSException
Specified by:
writeByte in interface StreamMessage
Overrides:
writeByte in class AbstractBytesTypedMessage
Throws:
JMSException

writeShort

public void writeShort(short i)
                throws JMSException
Specified by:
writeShort in interface StreamMessage
Overrides:
writeShort in class AbstractBytesTypedMessage
Throws:
JMSException

writeChar

public void writeChar(char c)
               throws JMSException
Specified by:
writeChar in interface StreamMessage
Overrides:
writeChar in class AbstractBytesTypedMessage
Throws:
JMSException

writeInt

public void writeInt(int i)
              throws JMSException
Specified by:
writeInt in interface StreamMessage
Overrides:
writeInt in class AbstractBytesTypedMessage
Throws:
JMSException

writeLong

public void writeLong(long l)
               throws JMSException
Specified by:
writeLong in interface StreamMessage
Overrides:
writeLong in class AbstractBytesTypedMessage
Throws:
JMSException

writeFloat

public void writeFloat(float v)
                throws JMSException
Specified by:
writeFloat in interface StreamMessage
Overrides:
writeFloat in class AbstractBytesTypedMessage
Throws:
JMSException

writeDouble

public void writeDouble(double v)
                 throws JMSException
Specified by:
writeDouble in interface StreamMessage
Overrides:
writeDouble in class AbstractBytesTypedMessage
Throws:
JMSException

writeString

public void writeString(String string)
                 throws JMSException
Specified by:
writeString in interface StreamMessage
Overrides:
writeString in class AbstractBytesTypedMessage
Throws:
JMSException

writeBytes

public void writeBytes(byte[] bytes)
                throws JMSException
Specified by:
writeBytes in interface StreamMessage
Overrides:
writeBytes in class AbstractBytesTypedMessage
Throws:
JMSException

writeBytes

public void writeBytes(byte[] bytes,
                       int offset,
                       int length)
                throws JMSException
Specified by:
writeBytes in interface StreamMessage
Overrides:
writeBytes in class AbstractBytesTypedMessage
Throws:
JMSException

writeObject

public void writeObject(Object object)
                 throws JMSException
Specified by:
writeObject in interface StreamMessage
Overrides:
writeObject in class AbstractBytesTypedMessage
Throws:
JMSException


Licensed to the Apache Software Foundation