Interface JmsMessage<PAYLOAD>
- 
- Type Parameters:
- PAYLOAD- Type of the payload.
 - All Superinterfaces:
- Message<PAYLOAD>
 - All Known Subinterfaces:
- AqMessage<T>
 - All Known Implementing Classes:
- JmsBytesMessage,- JmsTextMessage
 
 public interface JmsMessage<PAYLOAD> extends Message<PAYLOAD> Message representing JMS message together with all the metadata.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceJmsMessage.CustomMapper<PAYLOAD>Mapper for creatingMessage.static classJmsMessage.OutgoingJmsMessageBuilder<PAYLOAD>Outgoing JMS message builder.
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static <PAYLOAD> JmsMessage.OutgoingJmsMessageBuilder<PAYLOAD>builder()Outgoing JMS message builder.static <PAYLOAD> JmsMessage.OutgoingJmsMessageBuilder<PAYLOAD>builder(javax.jms.Message msg)Outgoing JMS message builder.static <PAYLOAD> JmsMessage.OutgoingJmsMessageBuilder<PAYLOAD>builder(PAYLOAD payload)Outgoing JMS message builder.default StringgetCorrelationId()Return correlation id of the message.javax.jms.ConnectiongetJmsConnection()Get client's connection to its JMS provider.javax.jms.ConnectionFactorygetJmsConnectionFactory()Get JMS connection factory.<MSG extends javax.jms.Message>
 MSGgetJmsMessage()Original JMS message received.javax.jms.SessiongetJmsSession()Metadata about the JMS session.<P> PgetProperty(String name)Get JMS property by name.Set<String>getPropertyNames()Return set of all JMS property names.default javax.jms.DestinationgetReplyTo()Return reply to destination of the message.default StringgetType()Return type identifier set by sending JMS client.booleanhasProperty(String name)Check if JMS property exists.booleanisAck()Check if message has been acknowledged yet.static <PAYLOAD> Message<PAYLOAD>of(PAYLOAD payload)Create a JmsMessage with the given payload.static <PAYLOAD> Message<PAYLOAD>of(PAYLOAD payload, Supplier<CompletionStage<Void>> ack)Create a JmsMessage with the given payload and ack function.- 
Methods inherited from interface org.eclipse.microprofile.reactive.messaging.Messageack, getPayload, unwrap
 
- 
 
- 
- 
- 
Method Detail- 
getJmsSessionjavax.jms.Session getJmsSession() Metadata about the JMS session.- Returns:
- JMS session
 
 - 
getJmsConnectionjavax.jms.Connection getJmsConnection() Get client's connection to its JMS provider.- Returns:
- JMS connection
 
 - 
getJmsConnectionFactoryjavax.jms.ConnectionFactory getJmsConnectionFactory() Get JMS connection factory.- Returns:
- JMS connection factory
 
 - 
getJmsMessage<MSG extends javax.jms.Message> MSG getJmsMessage() Original JMS message received.- Type Parameters:
- MSG- expected sub-type of- Message
- Returns:
- original JMS message received
- Throws:
- ClassCastException- when original payload cannot be casted to expected type
 
 - 
getTypedefault String getType() Return type identifier set by sending JMS client.- Returns:
- JMS type or null
 
 - 
getCorrelationIddefault String getCorrelationId() Return correlation id of the message.- Returns:
- correlation id or null
 
 - 
getReplyTodefault javax.jms.Destination getReplyTo() Return reply to destination of the message.- Returns:
- destination or null
 
 - 
isAckboolean isAck() Check if message has been acknowledged yet.- Returns:
- true if message has been acknowledged
 
 - 
getProperty<P> P getProperty(String name) Get JMS property by name.- Type Parameters:
- P- expected type of the property, has to be Boolean, Byte, Short, Integer, Long, Float, Double or String
- Parameters:
- name- the name of the JMS property
- Returns:
- property value with the specified name or null
- Throws:
- ClassCastException- when property cannot be casted to expected type
 
 - 
hasPropertyboolean hasProperty(String name) Check if JMS property exists.- Parameters:
- name- the name of the JMS property
- Returns:
- true if property exists
 
 - 
getPropertyNamesSet<String> getPropertyNames() Return set of all JMS property names.- Returns:
- JMS property names
 
 - 
ofstatic <PAYLOAD> Message<PAYLOAD> of(PAYLOAD payload, Supplier<CompletionStage<Void>> ack) Create a JmsMessage with the given payload and ack function.- Type Parameters:
- PAYLOAD- the type of payload
- Parameters:
- payload- The payload.
- ack- The ack function, this will be invoked when the returned messages- Message.ack()method is invoked.
- Returns:
- A message with the given payload and ack function.
 
 - 
ofstatic <PAYLOAD> Message<PAYLOAD> of(PAYLOAD payload) Create a JmsMessage with the given payload.- Type Parameters:
- PAYLOAD- The type of payload
- Parameters:
- payload- The payload.
- Returns:
- A message with the given payload, and a no-op ack function.
 
 - 
builderstatic <PAYLOAD> JmsMessage.OutgoingJmsMessageBuilder<PAYLOAD> builder(PAYLOAD payload) Outgoing JMS message builder. Makes possible to create JMS message with properties.- Type Parameters:
- PAYLOAD- JMS message payload type
- Parameters:
- payload- JMS message payload
- Returns:
- Message builder
 
 - 
builderstatic <PAYLOAD> JmsMessage.OutgoingJmsMessageBuilder<PAYLOAD> builder(javax.jms.Message msg) Outgoing JMS message builder. Makes possible to create JMS message fromMessageand customize result. Does NOT copy payload, only headers and properties.- Type Parameters:
- PAYLOAD- payload type
- Parameters:
- msg-- Messageto derive metadata
- Returns:
- Message builder
- Throws:
- MessagingException- when JMS provider can't retrieve message body, properties or metadata
 
 - 
builderstatic <PAYLOAD> JmsMessage.OutgoingJmsMessageBuilder<PAYLOAD> builder() Outgoing JMS message builder. Makes possible to create JMS message with properties.- Type Parameters:
- PAYLOAD- JMS message payload type
- Returns:
- Message builder
 
 
- 
 
-