org.jboss.jms.message
Class JBossStreamMessage

java.lang.Object
  extended by org.jboss.messaging.core.impl.message.MessageSupport
      extended by org.jboss.jms.message.JBossMessage
          extended by org.jboss.jms.message.JBossStreamMessage
All Implemented Interfaces:
java.io.Serializable, Message, Streamable

public class JBossStreamMessage
extends JBossMessage

This class implements javax.jms.StreamMessage.

Version:
$Revision: 3190 $ $Id: JBossStreamMessage.java 3190 2007-10-15 13:03:24Z timfox $
Author:
Norbert Lataille (Norbert.Lataille@m4x.org), Adrian Brock, Tim Fox, Ovidiu Feodorov
See Also:
Serialized Form

Field Summary
protected  int offset
           
protected  int position
           
protected  int size
           
static byte TYPE
           
 
Fields inherited from class org.jboss.jms.message.JBossMessage
connectionID, JBOSS_MESSAGING_ACTUAL_EXPIRY_TIME, JBOSS_MESSAGING_BRIDGE_MESSAGE_ID_LIST, JBOSS_MESSAGING_ORIG_DESTINATION, JBOSS_MESSAGING_ORIG_MESSAGE_ID, JMS_JBOSS_SCHEDULED_DELIVERY_PROP_NAME, jmsMessageID
 
Fields inherited from class org.jboss.messaging.core.impl.message.MessageSupport
expiration, headers, messageID, payload, payloadAsByteArray, priority, reliable, timestamp
 
Fields inherited from interface org.jboss.messaging.core.contract.Message
CLUSTER_SUCKED
 
Constructor Summary
JBossStreamMessage()
          Only deserialization should use this constructor directory
JBossStreamMessage(JBossStreamMessage other)
          Make a shallow copy of another JBossStreamMessage
JBossStreamMessage(long messageID)
           
JBossStreamMessage(long messageID, boolean reliable, long expiration, long timestamp, byte priority, java.util.Map coreHeaders, byte[] payloadAsByteArray)
           
JBossStreamMessage(StreamMessage foreign, long id)
           
 
Method Summary
 void clearBody()
           
 void copyPayload(java.lang.Object other)
           
 void doBeforeReceive()
           
 void doBeforeSend()
           
 JBossMessage doCopy()
           
 byte getType()
           
 boolean readBoolean()
           
 byte readByte()
           
 int readBytes(byte[] value)
           
 char readChar()
           
 double readDouble()
           
 float readFloat()
           
 int readInt()
           
 long readLong()
           
 java.lang.Object readObject()
           
 short readShort()
           
 java.lang.String readString()
           
 void reset()
           
 void writeBoolean(boolean value)
           
 void writeByte(byte value)
           
 void writeBytes(byte[] value)
           
 void writeBytes(byte[] value, int offset, int length)
           
 void writeChar(char value)
           
 void writeDouble(double value)
           
 void writeFloat(float value)
           
 void writeInt(int value)
           
 void writeLong(long value)
           
 void writeObject(java.lang.Object value)
           
 void writeShort(short value)
           
 void writeString(java.lang.String value)
           
 
Methods inherited from class org.jboss.jms.message.JBossMessage
acknowledge, clearProperties, createThinDelegate, dump, getBooleanProperty, getByteProperty, getConnectionID, getDoubleProperty, getFloatProperty, getHeaders, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSProperties, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getScheduledDeliveryTime, getShortProperty, getStringProperty, isCorrelationIDBytes, isReference, propertyExists, read, setBooleanProperty, setByteProperty, setConnectionID, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setMessageId, setObjectProperty, setShortProperty, setStringProperty, toString, write
 
Methods inherited from class org.jboss.messaging.core.impl.message.MessageSupport
containsHeader, createReference, equals, getExpiration, getHeader, getMessageID, getPayload, getPayloadAsByteArray, getPriority, getTimestamp, hashCode, isExpired, isPersisted, isReliable, putHeader, removeHeader, setExpiration, setPayload, setPersisted, setPriority
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE

public static final byte TYPE
See Also:
Constant Field Values

position

protected transient int position

offset

protected transient int offset

size

protected int size
Constructor Detail

JBossStreamMessage

public JBossStreamMessage()
Only deserialization should use this constructor directory


JBossStreamMessage

public JBossStreamMessage(long messageID)

JBossStreamMessage

public JBossStreamMessage(long messageID,
                          boolean reliable,
                          long expiration,
                          long timestamp,
                          byte priority,
                          java.util.Map coreHeaders,
                          byte[] payloadAsByteArray)

JBossStreamMessage

public JBossStreamMessage(JBossStreamMessage other)
Make a shallow copy of another JBossStreamMessage

Parameters:
other -

JBossStreamMessage

public JBossStreamMessage(StreamMessage foreign,
                          long id)
                   throws JMSException
Throws:
JMSException
Method Detail

getType

public byte getType()
Specified by:
getType in interface Message
Overrides:
getType in class JBossMessage
Returns:
the type of the message

doBeforeSend

public void doBeforeSend()
                  throws JMSException
Overrides:
doBeforeSend in class JBossMessage
Throws:
JMSException

doBeforeReceive

public void doBeforeReceive()
                     throws JMSException
Overrides:
doBeforeReceive in class JBossMessage
Throws:
JMSException

copyPayload

public void copyPayload(java.lang.Object other)
                 throws JMSException
Overrides:
copyPayload in class JBossMessage
Throws:
JMSException

readBoolean

public boolean readBoolean()
                    throws JMSException
Throws:
JMSException

readByte

public byte readByte()
              throws JMSException
Throws:
JMSException

readShort

public short readShort()
                throws JMSException
Throws:
JMSException

readChar

public char readChar()
              throws JMSException
Throws:
JMSException

readInt

public int readInt()
            throws JMSException
Throws:
JMSException

readLong

public long readLong()
              throws JMSException
Throws:
JMSException

readFloat

public float readFloat()
                throws JMSException
Throws:
JMSException

readDouble

public double readDouble()
                  throws JMSException
Throws:
JMSException

readString

public java.lang.String readString()
                            throws JMSException
Throws:
JMSException

readBytes

public int readBytes(byte[] value)
              throws JMSException
Throws:
JMSException

readObject

public java.lang.Object readObject()
                            throws JMSException
Throws:
JMSException

writeBoolean

public void writeBoolean(boolean value)
                  throws JMSException
Throws:
JMSException

writeByte

public void writeByte(byte value)
               throws JMSException
Throws:
JMSException

writeShort

public void writeShort(short value)
                throws JMSException
Throws:
JMSException

writeChar

public void writeChar(char value)
               throws JMSException
Throws:
JMSException

writeInt

public void writeInt(int value)
              throws JMSException
Throws:
JMSException

writeLong

public void writeLong(long value)
               throws JMSException
Throws:
JMSException

writeFloat

public void writeFloat(float value)
                throws JMSException
Throws:
JMSException

writeDouble

public void writeDouble(double value)
                 throws JMSException
Throws:
JMSException

writeString

public void writeString(java.lang.String value)
                 throws JMSException
Throws:
JMSException

writeBytes

public void writeBytes(byte[] value)
                throws JMSException
Throws:
JMSException

writeBytes

public void writeBytes(byte[] value,
                       int offset,
                       int length)
                throws JMSException
Throws:
JMSException

writeObject

public void writeObject(java.lang.Object value)
                 throws JMSException
Throws:
JMSException

reset

public void reset()
           throws JMSException
Throws:
JMSException

clearBody

public void clearBody()
               throws JMSException
Overrides:
clearBody in class JBossMessage
Throws:
JMSException

doCopy

public JBossMessage doCopy()
Overrides:
doCopy in class JBossMessage


Copyright © 2006 JBoss Inc. All Rights Reserved.