org.jboss.jms.message
Class JBossBytesMessage

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.JBossBytesMessage
All Implemented Interfaces:
java.io.Serializable, Message, Streamable

public class JBossBytesMessage
extends JBossMessage

This class implements javax.jms.BytesMessage.

Version:
$Revision: 3190 $ $Id: JBossBytesMessage.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
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
JBossBytesMessage()
          Only deserialization should use this constructor directly
JBossBytesMessage(BytesMessage foreign, long id)
           
JBossBytesMessage(JBossBytesMessage other)
          Make a shallow copy of another JBossBytesMessage
JBossBytesMessage(long messageID)
           
JBossBytesMessage(long messageID, boolean reliable, long expiration, long timestamp, byte priority, java.util.Map coreHeaders, byte[] payloadAsByteArray)
           
 
Method Summary
 void clearBody()
           
 void copyPayload(java.lang.Object payload)
           
 void doBeforeReceive()
           
 void doBeforeSend()
           
 JBossMessage doCopy()
           
 long getBodyLength()
           
 java.lang.Object getPayload()
           
 byte[] getPayloadAsByteArray()
           
 byte getType()
           
 void read(java.io.DataInputStream in)
           
 boolean readBoolean()
           
 byte readByte()
           
 int readBytes(byte[] value)
           
 int readBytes(byte[] value, int length)
           
 char readChar()
           
 double readDouble()
           
 float readFloat()
           
 int readInt()
           
 long readLong()
           
 short readShort()
           
 int readUnsignedByte()
           
 int readUnsignedShort()
           
 java.lang.String readUTF()
           
 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 writeUTF(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, 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, 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
Constructor Detail

JBossBytesMessage

public JBossBytesMessage()
Only deserialization should use this constructor directly


JBossBytesMessage

public JBossBytesMessage(long messageID)

JBossBytesMessage

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

JBossBytesMessage

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

Parameters:
other -

JBossBytesMessage

public JBossBytesMessage(BytesMessage foreign,
                         long id)
                  throws JMSException
Throws:
JMSException
Method Detail

read

public void read(java.io.DataInputStream in)
          throws java.lang.Exception
Specified by:
read in interface Streamable
Overrides:
read in class JBossMessage
Throws:
java.lang.Exception

readBoolean

public boolean readBoolean()
                    throws JMSException
Throws:
JMSException

readByte

public byte readByte()
              throws JMSException
Throws:
JMSException

readUnsignedByte

public int readUnsignedByte()
                     throws JMSException
Throws:
JMSException

readShort

public short readShort()
                throws JMSException
Throws:
JMSException

readUnsignedShort

public int readUnsignedShort()
                      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

readUTF

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

readBytes

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

readBytes

public int readBytes(byte[] value,
                     int length)
              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

writeUTF

public void writeUTF(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

getPayload

public java.lang.Object getPayload()
Specified by:
getPayload in interface Message
Overrides:
getPayload in class MessageSupport
Returns:
The message's payload

getPayloadAsByteArray

public byte[] getPayloadAsByteArray()
Specified by:
getPayloadAsByteArray in interface Message
Overrides:
getPayloadAsByteArray in class MessageSupport
Returns:
The message's payload in byte[] form

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

clearBody

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

getBodyLength

public long getBodyLength()
                   throws JMSException
Throws:
JMSException

getType

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

doCopy

public JBossMessage doCopy()
                    throws JMSException
Overrides:
doCopy in class JBossMessage
Throws:
JMSException

copyPayload

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


Copyright © 2006 JBoss Inc. All Rights Reserved.