Class IncomingJmsMessage<T>
- java.lang.Object
-
- io.smallrye.reactive.messaging.jms.IncomingJmsMessage<T>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletionStage<Void>
ack()
Acknowledge this message.Supplier<CompletionStage<Void>>
getAck()
Metadata
getMetadata()
T
getPayload()
<C> C
unwrap(Class<C> unwrapType)
Returns an object of the specified type to allow access to the connector-specificMessage
implementation, and other classes.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.microprofile.reactive.messaging.Message
addMetadata, getMetadata, getNack, nack, nack, withAck, withMetadata, withMetadata, withNack, withPayload
-
-
-
-
Method Detail
-
getPayload
public T getPayload()
- Specified by:
getPayload
in interfaceMessage<T>
- Returns:
- The payload for this message.
-
getAck
public Supplier<CompletionStage<Void>> getAck()
- Specified by:
getAck
in interfaceMessage<T>
- Returns:
- the supplier used to retrieve the acknowledgement
CompletionStage
.
-
ack
public CompletionStage<Void> ack()
Description copied from interface:Message
Acknowledge this message.
-
getMetadata
public Metadata getMetadata()
- Specified by:
getMetadata
in interfaceMessage<T>
- Returns:
- The set of metadata attached to this message, potentially empty.
-
unwrap
public <C> C unwrap(Class<C> unwrapType)
Description copied from interface:Message
Returns an object of the specified type to allow access to the connector-specificMessage
implementation, and other classes. For example, a Kafka connector could implement this method to allow unwrapping to a specific Kafka message implementation, or toConsumerRecord
andProducerRecord
. If theMessage
implementation does not support the target class, anIllegalArgumentException
should be raised.The default implementation tries to cast the current
Message
instance to the target class. When a connector provides its ownMessage
implementation, it should override this method to support specific types.
-
-