public class MessageHeader
extends java.lang.Object
JmsProducer
and the JMS implementation for Header
.JmsProducer
,
JMSProducerMethodInterceptor
Constructor and Description |
---|
MessageHeader(java.lang.String key,
java.lang.Object value)
Creates a container for the message header.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(javax.jms.Message message)
If this is a supported JMS header, attempts to set the header given by
the
key with the value given with value , doing all
required type conversions. |
java.lang.String |
toString() |
public MessageHeader(java.lang.String key, java.lang.Object value)
key
- the header namevalue
- the header valuepublic void apply(javax.jms.Message message)
key
with the value given with value
, doing all
required type conversions. Not all JMS headers are supported since most
are set by the JMS provider (e.g. JMSHeaders.JMS_PRIORITY
).
If the header isn't a JMS header, sets an object property. This is only
supported for Strings and objectified primitive object types (Boolean,
Byte, Short, Integer, Long, Float, Double).message
- the messagepublic java.lang.String toString()
toString
in class java.lang.Object