org.jboss.jms.message
Class JBossTextMessage

java.lang.Object
  extended byorg.jboss.messaging.core.message.RoutableSupport
      extended byorg.jboss.messaging.core.message.MessageSupport
          extended byorg.jboss.jms.message.JBossMessage
              extended byorg.jboss.jms.message.JBossTextMessage
All Implemented Interfaces:
java.io.Externalizable, Message, Routable, java.io.Serializable

public class JBossTextMessage
extends JBossMessage

This class implements javax.jms.TextMessage ported from SpyTextMessage in JBossMQ.

Version:
$Revision: 997 $ $Id: JBossTextMessage.java 997 2006-06-19 15:16:09Z timfox $
Author:
Norbert Lataille (Norbert.Lataille@m4x.org), Jason Dillon, 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, correlationID, correlationIDBytes, destination, jmsMessageID, jmsType, properties, replyToDestination
 
Fields inherited from class org.jboss.messaging.core.message.RoutableSupport
BOOLEAN, BYTE, BYTES, deliveryCount, DOUBLE, expiration, FLOAT, headers, INT, LIST, LONG, MAP, messageID, NULL, OBJECT, priority, reliable, SHORT, STRING, timestamp
 
Fields inherited from interface org.jboss.messaging.core.Routable
COLLECTOR_ID, REMOTE_ROUTABLE, REPLICATOR_ID
 
Constructor Summary
JBossTextMessage()
          Only deserialization should use this constructor directory
JBossTextMessage(JBossTextMessage other)
          Make a shallow copy of another JBossTextMessage
JBossTextMessage(long messageID)
           
JBossTextMessage(long messageID, boolean reliable, long expiration, long timestamp, byte priority, java.util.Map coreHeaders, byte[] payloadAsByteArray, int persistentChannelCount, java.lang.String jmsType, java.lang.String correlationID, byte[] correlationIDBytes, JBossDestination destination, JBossDestination replyTo, java.util.HashMap jmsProperties)
           
JBossTextMessage(TextMessage foreign, long id)
          A copy constructor for non-JBoss Messaging JMS TextMessages.
 
Method Summary
 JBossMessage doShallowCopy()
           
 java.lang.String getText()
           
 byte getType()
           
protected  java.io.Serializable readPayloadExternal(java.io.ObjectInput in, int length)
          Override this if you want more sophisticated payload externalization.
 void setText(java.lang.String string)
           
protected  void writePayloadExternal(java.io.ObjectOutput out, java.io.Serializable thePayload)
          Override this if you want more sophisticated payload externalization.
 
Methods inherited from class org.jboss.jms.message.JBossMessage
acknowledge, clearBody, clearProperties, copyPayload, createThinDelegate, doAfterSend, dump, getBooleanProperty, getByteProperty, getConnectionID, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSProperties, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, isCorrelationIDBytes, isReference, propertyExists, readDestination, readExternal, setBooleanProperty, setByteProperty, setConnectionID, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSProperties, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setMessageId, setObjectProperty, setShortProperty, setStringProperty, toString, writeDestination, writeExternal
 
Methods inherited from class org.jboss.messaging.core.message.MessageSupport
clearPayloadAsByteArray, copyPayloadAsByteArrayToPayload, decPersistentChannelCount, equals, getHeaders, getMessage, getPayload, getPayloadAsByteArray, getPersistentChannelCount, hashCode, incPersistentChannelCount, setPayload
 
Methods inherited from class org.jboss.messaging.core.message.RoutableSupport
containsHeader, decrementDeliveryCount, getDeliveryCount, getExpiration, getHeader, getHeaderNames, getMessageID, getPriority, getTimestamp, incrementDeliveryCount, internalReadObject, internalWriteObject, isExpired, isReliable, putHeader, readList, readMap, removeHeader, setDeliveryCount, setPriority, setReliable, writeList, writeMap
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.messaging.core.Routable
containsHeader, decrementDeliveryCount, getDeliveryCount, getExpiration, getHeader, getHeaderNames, getMessageID, getPriority, getTimestamp, incrementDeliveryCount, isExpired, isReliable, putHeader, removeHeader, setDeliveryCount, setPriority, setReliable
 

Field Detail

TYPE

public static final byte TYPE
See Also:
Constant Field Values
Constructor Detail

JBossTextMessage

public JBossTextMessage()
Only deserialization should use this constructor directory


JBossTextMessage

public JBossTextMessage(long messageID)

JBossTextMessage

public JBossTextMessage(long messageID,
                        boolean reliable,
                        long expiration,
                        long timestamp,
                        byte priority,
                        java.util.Map coreHeaders,
                        byte[] payloadAsByteArray,
                        int persistentChannelCount,
                        java.lang.String jmsType,
                        java.lang.String correlationID,
                        byte[] correlationIDBytes,
                        JBossDestination destination,
                        JBossDestination replyTo,
                        java.util.HashMap jmsProperties)

JBossTextMessage

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

Parameters:
other -

JBossTextMessage

public JBossTextMessage(TextMessage foreign,
                        long id)
                 throws JMSException
A copy constructor for non-JBoss Messaging JMS TextMessages.

Method Detail

getType

public byte getType()
Overrides:
getType in class JBossMessage

setText

public void setText(java.lang.String string)
             throws JMSException
Throws:
JMSException

getText

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

doShallowCopy

public JBossMessage doShallowCopy()
Overrides:
doShallowCopy in class JBossMessage

writePayloadExternal

protected void writePayloadExternal(java.io.ObjectOutput out,
                                    java.io.Serializable thePayload)
                             throws java.io.IOException
Description copied from class: MessageSupport
Override this if you want more sophisticated payload externalization.

Overrides:
writePayloadExternal in class MessageSupport
Throws:
java.io.IOException

readPayloadExternal

protected java.io.Serializable readPayloadExternal(java.io.ObjectInput in,
                                                   int length)
                                            throws java.io.IOException,
                                                   java.lang.ClassNotFoundException
Description copied from class: MessageSupport
Override this if you want more sophisticated payload externalization.

Overrides:
readPayloadExternal in class MessageSupport
Throws:
java.io.IOException
java.lang.ClassNotFoundException


Copyright © 2006 JBoss Inc. All Rights Reserved.