Class IncomingJmsMessage<T>

  • All Implemented Interfaces:
    Message<T>

    public class IncomingJmsMessage<T>
    extends Object
    implements Message<T>
    • Method Detail

      • getPayload

        public T getPayload()
        Specified by:
        getPayload in interface Message<T>
        Returns:
        The payload for this message.
      • ack

        public CompletionStage<Void> ack()
        Description copied from interface: Message
        Acknowledge this message.
        Specified by:
        ack in interface Message<T>
        Returns:
        a completion stage completed when the message is acknowledged. If the acknowledgement fails, the completion stage propagates the failure.
      • getMetadata

        public Metadata getMetadata()
        Specified by:
        getMetadata in interface Message<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-specific Message implementation, and other classes. For example, a Kafka connector could implement this method to allow unwrapping to a specific Kafka message implementation, or to ConsumerRecord and ProducerRecord. If the Message implementation does not support the target class, an IllegalArgumentException should be raised.

        The default implementation tries to cast the current Message instance to the target class. When a connector provides its own Message implementation, it should override this method to support specific types.

        Specified by:
        unwrap in interface Message<T>
        Type Parameters:
        C - the target type
        Parameters:
        unwrapType - the class of the object to be returned, must not be null
        Returns:
        an instance of the specified class