new Message()
This method is not meant to be used directly.
Creates a Message object that holds the information needed to
send a JMS message on the JMS Extender.
Method Summary
- acknowledge
- Acknowledges this message.
- clearBody
- Clears the message body (e.
- clearProperties
- Clears the message properties.
- getJMSCorrelationID
- Gets the correlation ID for the message.
- getJMSDeliveryMode
- Gets the DeliveryMode value specified for this message.
- getJMSDeliveryTime
- Gets the message's delivery time value.
- getJMSDestination
- Gets the Destination object for this message.
- getJMSExpiration
- Gets the message's expiration value.
- getJMSMessageID
- Gets the message ID.
- getJMSPriority
- Gets the message priority level.
- getJMSRedelivered
- Gets an indication of whether this message is being redelivered.
- getJMSReplyTo
- Returns the destination a reply should be sent to.
- getJMSTimestamp
- Gets the message timestamp.
- getJMSType
- Gets the message type identifier supplied by the client when the message was sent.
- getObjectProperty
- Returns the value of the property with the specified name.
- setJMSCorrelationID
- Sets the correlation ID for the message.
- setJMSDeliveryMode
- Sets the DeliveryMode value for this message.
- setJMSDeliveryTime
- Sets the message's delivery time value.
- setJMSDestination
- Sets the Destination object for this message.
- setJMSExpiration
- Sets the message's expiration value.
- setJMSMessageID
- Sets the message ID.
- setJMSPriority
- Sets the priority level for this message.
- setJMSRedelivered
- Specifies whether this message is being redelivered.
- setJMSReplyTo
- Sets the destination a replay should be sent to.
- setJMSTimestamp
- Sets the message timestamp.
- setJMSType
- Sets the message type.
- setObjectProperty
- Sets a property value with the specified name into the message.
Method Detail
-
acknowledge()
-
Acknowledges this message. If message's session is implicitly acknowledging messages this call will be ignored.
Implementation note: causes a message to be sent to the JMS Extender that will acknowledge the message on the JMS broker. -
clearBody()
-
Clears the message body (e.g. the payload). Message properties and specifications remain unaltered.
-
clearProperties()
-
Clears the message properties. Message body (e.g. payload) and specifications remain unaltered.
-
getJMSCorrelationID() → {String}
-
Gets the correlation ID for the message.
Returns:
- Type
- String
-
getJMSDeliveryMode() → {String}
-
Gets the DeliveryMode value specified for this message.
Returns:
- Type
- String
-
getJMSDeliveryTime() → {Number}
-
Gets the message's delivery time value.
When a message is sent, the JMSDeliveryTime header field is left unassigned. After completion of the send or publish method, it holds the delivery time of the message. This is the the difference, measured in milliseconds, between the delivery time and midnight, January 1, 1970 UTC.Returns:
- Type
- Number
-
getJMSDestination() → {Destination}
-
Gets the Destination object for this message.
Returns:
- Type
- Destination
-
getJMSExpiration() → {Number}
-
Gets the message's expiration value.
This is the sum of the time-to-live value specified by the client and the GMT at the time of the send or publish.
If the time-to-live is specified as zero, JMSExpiration is set to zero to indicate that the message does not expire.Returns:
- Type
- Number
-
getJMSMessageID() → {String}
-
Gets the message ID.
The JMSMessageID header field contains a value that uniquely identifies each message sent by a provider.Returns:
- Type
- String
-
getJMSPriority() → {Number}
-
Gets the message priority level.
Returns:
- Type
- Number
-
getJMSRedelivered() → {Boolean}
-
Gets an indication of whether this message is being redelivered.
Returns:
- Type
- Boolean
-
getJMSReplyTo() → {Destination}
-
Returns the destination a reply should be sent to.
Returns:
- Type
- Destination
-
getJMSTimestamp() → {Number}
-
Gets the message timestamp.
The JMSTimestamp header field contains the time a message was handed off to a provider to be sent.
See JMS specs for more information.Returns:
- Type
- Number
-
getJMSType() → {String}
-
Gets the message type identifier supplied by the client when the message was sent.
Returns:
- Type
- String
-
getObjectProperty() → {Object}
-
Returns the value of the property with the specified name.
Returns:
- Type
- Object
-
setJMSCorrelationID(correlationId)
-
Sets the correlation ID for the message.
A client can use the JMSCorrelationID header field to link one message with another. A typical use is to link a response message with its request message.
See JMS specs for more information.Parameters:
Name Type Description correlationId
String the message ID of a message being referred to -
setJMSDeliveryMode(deliveryMode)
-
Sets the DeliveryMode value for this message. It can either be
"PERSISTENT"
or"NON_PERSISTENT"
.Parameters:
Name Type Description deliveryMode
String the delivery mode for this message -
setJMSDeliveryTime(deliveryTime)
-
Sets the message's delivery time value.
This method is for use by JMS providers only to set this field when a message is sent.Parameters:
Name Type Description deliveryTime
Number the message delivery time. -
setJMSDestination(destination)
-
Sets the Destination object for this message.
This field is set at the time the message is delivered. This method can be used to change the value for a message that has been received.Parameters:
Name Type Description destination
Destination the destination for this message -
setJMSExpiration(expiration)
-
Sets the message's expiration value.
This field is set at the time the message is delivered. This method can be used to change the value for a message that has already been received.Parameters:
Name Type Description expiration
Number the message's expiration time -
setJMSMessageID(messageId)
-
Sets the message ID.
This field is set at the time the message is delivered. This method can be used to change the value for a message that has already been received.Parameters:
Name Type Description messageId
String the ID of the message -
setJMSPriority(priority)
-
Sets the priority level for this message.
Parameters:
Name Type Description priority
Number the priority of this message -
setJMSRedelivered(redelivered)
-
Specifies whether this message is being redelivered.
This field is set at the time the message is delivered. This method can be used to change the value for a message that has already been received.Parameters:
Name Type Description redelivered
Boolean an indication of whether this message is being redelivered -
setJMSReplyTo(destination)
-
Sets the destination a replay should be sent to.
Parameters:
Name Type Description destination
Destination the destination a reply should be sent to. -
setJMSTimestamp(timestamp)
-
Sets the message timestamp.
This field is set at the time the message is delivered. This method can be used to change the value for a message that has already been received.Parameters:
Name Type Description timestamp
Number the timestamp for this message -
setJMSType(type)
-
Sets the message type.
Some JMS brokers use a message repository that contains the definitions of messages sent by applications. The JMSType header field may reference a message's definition in the provider's repository.
See JMS specs for more information.Parameters:
Name Type Description type
String the message type -
setObjectProperty(name, value)
-
Sets a property value with the specified name into the message.
Note that property values must be one of recognized Java primitives, e.g. integer, double, string, etc. Use of a custom object may raise an exception on the JMS Extender and cause the message to be lost.Parameters:
Name Type Description name
String name of property. value
Object value of the property.