org.exolab.jmscts.core
Class MessageBodyReferenceComparer
java.lang.Object
|
+--org.exolab.jmscts.core.AbstractMessageComparer
|
+--org.exolab.jmscts.core.MessageBodyReferenceComparer
- All Implemented Interfaces:
- MessageComparer
- public class MessageBodyReferenceComparer
- extends AbstractMessageComparer
A helper class for comparing if the body of two messages refer to the
same object(s).
- Version:
- $Revision: 1.3 $ $Date: 2004/01/31 13:44:24 $
- Author:
- Tim Anderson
Method Summary |
boolean |
compareBytesMessages(javax.jms.BytesMessage message1,
javax.jms.BytesMessage message2)
Compare two BytesMessage instances. |
boolean |
compareMapMessages(javax.jms.MapMessage message1,
javax.jms.MapMessage message2)
Compare two MapMessage instances |
boolean |
compareObjectMessages(javax.jms.ObjectMessage message1,
javax.jms.ObjectMessage message2)
Compare two ObjectMessage instances |
boolean |
compareStreamMessages(javax.jms.StreamMessage message1,
javax.jms.StreamMessage message2)
Compare two StreamMessage instances |
boolean |
compareTextMessages(javax.jms.TextMessage message1,
javax.jms.TextMessage message2)
Compare two TextMessage instances |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageBodyReferenceComparer
public MessageBodyReferenceComparer()
compareBytesMessages
public boolean compareBytesMessages(javax.jms.BytesMessage message1,
javax.jms.BytesMessage message2)
- Compare two BytesMessage instances. It is impossible to tell via
the BytesMessage API if the message bodies refer to the same byte
array, so this implementation always returns
false
- Overrides:
compareBytesMessages
in class AbstractMessageComparer
- Parameters:
message1
- the message to comparemessage2
- the message to compare- Returns:
false
when invoked
compareMapMessages
public boolean compareMapMessages(javax.jms.MapMessage message1,
javax.jms.MapMessage message2)
throws java.lang.Exception
- Compare two MapMessage instances
- Overrides:
compareMapMessages
in class AbstractMessageComparer
- Parameters:
message1
- the message to comparemessage2
- the message to compare- Returns:
true
if the messages bodies contain references
to the same objects- Throws:
java.lang.Exception
- for any error
compareObjectMessages
public boolean compareObjectMessages(javax.jms.ObjectMessage message1,
javax.jms.ObjectMessage message2)
throws java.lang.Exception
- Compare two ObjectMessage instances
- Overrides:
compareObjectMessages
in class AbstractMessageComparer
- Parameters:
message1
- the message to comparemessage2
- the message to compare- Returns:
true
if the messages bodies contain references
to the same objects- Throws:
java.lang.Exception
- for any error
compareStreamMessages
public boolean compareStreamMessages(javax.jms.StreamMessage message1,
javax.jms.StreamMessage message2)
throws java.lang.Exception
- Compare two StreamMessage instances
- Overrides:
compareStreamMessages
in class AbstractMessageComparer
- Parameters:
message1
- the message to comparemessage2
- the message to compare- Returns:
true
if the messages bodies contain references
to the same objects- Throws:
java.lang.Exception
- for any error
compareTextMessages
public boolean compareTextMessages(javax.jms.TextMessage message1,
javax.jms.TextMessage message2)
throws java.lang.Exception
- Compare two TextMessage instances
- Overrides:
compareTextMessages
in class AbstractMessageComparer
- Parameters:
message1
- the message to comparemessage2
- the message to compare- Returns:
true
if the messages bodies contain references
to the same objects- Throws:
java.lang.Exception
- for any error
Copyright © 2001-2004 JMS CTS Team. All Rights Reserved.