Package com.consol.citrus.jms.message
Class JmsMessage
- java.lang.Object
-
- com.consol.citrus.message.DefaultMessage
-
- com.consol.citrus.jms.message.JmsMessage
-
- All Implemented Interfaces:
Message,Serializable
public class JmsMessage extends DefaultMessage
- Since:
- 2.0
- Author:
- Christoph Deppisch
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JmsMessage()Empty constructor initializing with empty message payload.JmsMessage(Message message)Constructs copy of given message.JmsMessage(Object payload)Default constructor using message payload.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JmsMessagecorrelationId(String correlationId)Sets the JMS correlation id header.StringgetCorrelationId()Gets the JMS correlationId header.StringgetMessageId()Gets the JMS messageId header.StringgetRedelivered()Gets the JMS redelivered header.javax.jms.DestinationgetReplyTo()Gets the JMS reply to header.LonggetTimestamp()Gets the JMS timestamp header.StringgetType()Gets the JMS type header.JmsMessagemessageId(String messageId)Sets the JMS message id header.JmsMessageredelivered(String redelivered)Sets the JMS redelivered header.JmsMessagereplyTo(javax.jms.Destination replyTo)Sets the JMS reply to header.JmsMessagetimestamp(Long timestamp)Sets the JMS timestamp header.JmsMessagetype(String type)Sets the JMS type header.-
Methods inherited from class com.consol.citrus.message.DefaultMessage
addHeaderData, getHeader, getHeaderData, getHeaders, getId, getName, getPayload, getPayload, removeHeader, setHeader, setName, setPayload, setType, setType, toString
-
-
-
-
Constructor Detail
-
JmsMessage
public JmsMessage()
Empty constructor initializing with empty message payload.
-
JmsMessage
public JmsMessage(Message message)
Constructs copy of given message.- Parameters:
message-
-
JmsMessage
public JmsMessage(Object payload)
Default constructor using message payload.- Parameters:
payload-
-
-
Method Detail
-
messageId
public JmsMessage messageId(String messageId)
Sets the JMS message id header.- Parameters:
messageId-
-
timestamp
public JmsMessage timestamp(Long timestamp)
Sets the JMS timestamp header.- Parameters:
timestamp-
-
correlationId
public JmsMessage correlationId(String correlationId)
Sets the JMS correlation id header.- Parameters:
correlationId-
-
replyTo
public JmsMessage replyTo(javax.jms.Destination replyTo)
Sets the JMS reply to header.- Parameters:
replyTo-
-
redelivered
public JmsMessage redelivered(String redelivered)
Sets the JMS redelivered header.- Parameters:
redelivered-
-
type
public JmsMessage type(String type)
Sets the JMS type header.- Parameters:
type-
-
getMessageId
public String getMessageId()
Gets the JMS messageId header.- Returns:
-
getTimestamp
public Long getTimestamp()
Gets the JMS timestamp header.- Overrides:
getTimestampin classDefaultMessage- Returns:
-
getCorrelationId
public String getCorrelationId()
Gets the JMS correlationId header.- Returns:
-
getReplyTo
public javax.jms.Destination getReplyTo()
Gets the JMS reply to header.- Returns:
-
getRedelivered
public String getRedelivered()
Gets the JMS redelivered header.- Returns:
-
getType
public String getType()
Gets the JMS type header.- Specified by:
getTypein interfaceMessage- Overrides:
getTypein classDefaultMessage- Returns:
-
-