Object - jms : Message

Represent the JMS message used to send and receive content from the a JMS provider.

Most message-oriented middleware (MOM) products treat messages as lightweight entities that consist of a header and a body. The header contains fields used for message routing and identification; the body contains the application data being sent.

Methods

getTextMessageContent

Gets text content of the JMS message

getMapMessageContent

Gets map content of the JMS message

setStringProperty

Sets a JMS transport string property from the message

getStringProperty

Gets a JMS transport string property from the message

setIntProperty

Sets a JMS transport integer property from the message

getIntProperty

Gets a JMS transport integer property from the message

setBooleanProperty

Sets a JMS transport boolean property from the message

getBooleanProperty

Gets a JMS transport boolean property from the message

setFloatProperty

Sets a JMS transport float property from the message

getFloatProperty

Gets a JMS transport float property from the message

getMessageID

Gets JMS transport header MessageID from the message

getTimestamp

Gets JMS transport header Timestamp from the message

setDeliveryMode

Sets DeliveryMode JMS transport header to the message

getDeliveryMode

Get JMS transport header DeliveryMode from the message

setExpiration

Sets Expiration JMS transport header to the message

getExpiration

Gets JMS transport header Expiration from the message

setType

Sets Type JMS transport header to the message

getType

Gets JMS transport header Type from the message

clearProperties

Clears JMS properties of the message

clearBody

Clears body of the JMS message

setPriority

Sets priority JMS transport header to the message

getPriority

Gets JMS transport header Priority from the message

getRedelivered

Gets JMS transport header Redelivered from the message

setCorrelationID

Sets CorrelationID JMS transport header to the message

getCorrelationID

Gets JMS transport header CorrelationID from the message

getReplyTo

Gets JMS replyTo header from the message

setReplyTo

Set the replyTo destination from the message

getTextMessageContent

()

returns string | error

Gets text content of the JMS message

  • Return Type

    (string | error)
  • The string containing this message's data or a JMS error

getMapMessageContent

()

returns map | error

Gets map content of the JMS message

  • Return Type

    (map | error)
  • The string containing this message's data or a JMS error

setStringProperty

(string key, string value)

returns error?

Sets a JMS transport string property from the message

Parameters

  • key string
  • The string property name

  • value string
  • The string property value

  • Return Type

    (error?)
  • Nil or a JMS error

getStringProperty

(string key)

returns string | error | ()

Gets a JMS transport string property from the message

Parameters

  • key string
  • The string property name

  • Return Type

    (string | error | ())
  • The string property value, JMS error or nil if there is no property by this name

setIntProperty

(string key, int value)

returns error?

Sets a JMS transport integer property from the message

Parameters

  • key string
  • The integer property name

  • value int
  • The integer property value

  • Return Type

    (error?)
  • Nil or a JMS error

getIntProperty

(string key)

returns int | error

Gets a JMS transport integer property from the message

Parameters

  • key string
  • The integer property name

  • Return Type

    (int | error)
  • The integer property value or JMS error

setBooleanProperty

(string key, boolean value)

returns error?

Sets a JMS transport boolean property from the message

Parameters

  • key string
  • The boolean property name

  • value boolean
  • The boolean property value

  • Return Type

    (error?)
  • Nil or a JMS error

getBooleanProperty

(string key)

returns boolean | error

Gets a JMS transport boolean property from the message

Parameters

  • key string
  • The boolean property name

  • Return Type

    (boolean | error)
  • The boolean property value or JMS error

setFloatProperty

(string key, float value)

returns error?

Sets a JMS transport float property from the message

Parameters

  • key string
  • The float property name

  • value float
  • The float property value

  • Return Type

    (error?)
  • Nil or a JMS error

getFloatProperty

(string key)

returns float | error

Gets a JMS transport float property from the message

Parameters

  • key string
  • The float property name

  • Return Type

    (float | error)
  • The float property value or JMS error

getMessageID

()

returns string | error

Gets JMS transport header MessageID from the message

  • Return Type

    (string | error)
  • The header value or JMS error

getTimestamp

()

returns int | error

Gets JMS transport header Timestamp from the message

  • Return Type

    (int | error)
  • The timestamp header value or JMS error

setDeliveryMode

(int mode)

returns error?

Sets DeliveryMode JMS transport header to the message

Parameters

  • mode int
  • The header value

  • Return Type

    (error?)
  • nil or a JMS error

getDeliveryMode

()

returns int | error

Get JMS transport header DeliveryMode from the message

  • Return Type

    (int | error)
  • The delivery mode header value or JMS error

setExpiration

(int time)

returns error?

Sets Expiration JMS transport header to the message

Parameters

  • time int
  • The expiration time header value

  • Return Type

    (error?)
  • nil or a JMS error

getExpiration

()

returns int | error

Gets JMS transport header Expiration from the message

  • Return Type

    (int | error)
  • The expiration header value or JMS error

setType

(string messageType)

returns error?

Sets Type JMS transport header to the message

Parameters

  • messageType string
  • The message type header value

  • Return Type

    (error?)
  • nil or an JMS error if any JMS provider level internal error occur

getType

()

returns string | error | ()

Gets JMS transport header Type from the message

  • Return Type

    (string | error | ())
  • The JMS message type header value or JMS error

clearProperties

()

returns error?

Clears JMS properties of the message

  • Return Type

    (error?)
  • nil or error if any JMS provider level internal error occur

clearBody

()

returns error?

Clears body of the JMS message

  • Return Type

    (error?)
  • nil or a JMS error

setPriority

(int priority)

returns error?

Sets priority JMS transport header to the message

Parameters

  • priority int
  • The priority header value

  • Return Type

    (error?)
  • nil or a JMS error

getPriority

()

returns int | error

Gets JMS transport header Priority from the message

  • Return Type

    (int | error)
  • The JMS priority header value or error

getRedelivered

()

returns boolean | error

Gets JMS transport header Redelivered from the message

  • Return Type

    (boolean | error)
  • The JMS redelivered header value or JMS error

setCorrelationID

(string correlationId)

returns error?

Sets CorrelationID JMS transport header to the message

Parameters

  • correlationId string
  • The correlationId header value

  • Return Type

    (error?)
  • nil or a JMS error

getCorrelationID

()

returns string | error | ()

Gets JMS transport header CorrelationID from the message

  • Return Type

    (string | error | ())
  • The JMS correlation ID header value or JMS error or nil if header is not set

getReplyTo

()

returns Destination | error | ()

Gets JMS replyTo header from the message

  • Return Type

    (Destination | error | ())
  • The JMS replyTo Destination or JMS error or nil if header is not set

setReplyTo

(Destination replyTo)

returns error?

Set the replyTo destination from the message

Parameters

  • Return Type

    (error?)
  • nil or JMS error