com.mockrunner.mock.jms
Class MockTextMessage

java.lang.Object
  extended by com.mockrunner.mock.jms.MockMessage
      extended by com.mockrunner.mock.jms.MockTextMessage
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, javax.jms.Message, javax.jms.TextMessage

public class MockTextMessage
extends MockMessage
implements javax.jms.TextMessage

Mock implementation of JMS TextMessage.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface javax.jms.Message
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE
 
Constructor Summary
MockTextMessage()
           
MockTextMessage(java.lang.String text)
           
 
Method Summary
 void clearBody()
           
 boolean equals(java.lang.Object otherObject)
          Compares the underlying String.
 java.lang.String getText()
           
 int hashCode()
           
 void setText(java.lang.String text)
           
 java.lang.String toString()
           
 
Methods inherited from class com.mockrunner.mock.jms.MockMessage
acknowledge, clearProperties, clone, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, isAcknowledged, isInWriteMode, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setReadOnly, setReadOnlyProperties, setShortProperty, setStringProperty
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.jms.Message
acknowledge, 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

MockTextMessage

public MockTextMessage()

MockTextMessage

public MockTextMessage(java.lang.String text)
Method Detail

setText

public void setText(java.lang.String text)
             throws javax.jms.JMSException
Specified by:
setText in interface javax.jms.TextMessage
Throws:
javax.jms.JMSException

getText

public java.lang.String getText()
                         throws javax.jms.JMSException
Specified by:
getText in interface javax.jms.TextMessage
Throws:
javax.jms.JMSException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clearBody

public void clearBody()
               throws javax.jms.JMSException
Specified by:
clearBody in interface javax.jms.Message
Overrides:
clearBody in class MockMessage
Throws:
javax.jms.JMSException

equals

public boolean equals(java.lang.Object otherObject)
Compares the underlying String. If the Strings of both messages are null, this method returns true.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object