Package io.micronaut.jms.model
Class MessageHeader
java.lang.Object
io.micronaut.jms.model.MessageHeader
Represents a header on a JMS message. Used in the
JmsProducer
and the JMS implementation for MessageHeader.- Since:
- 1.0.0
- Author:
- Elliott Pope
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMessageHeader(String key, Object value) Creates a container for the message header. -
Method Summary
-
Constructor Details
-
MessageHeader
Creates a container for the message header.- Parameters:
key- the header namevalue- the header value
-
-
Method Details
-
apply
public void apply(jakarta.jms.Message message) If this is a supported JMS header, attempts to set the header given by thekeywith the value given withvalue, 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).- Parameters:
message- the message
-
toString
-