Class MappedMessage


  • public final class MappedMessage
    extends Object
    The result of mapping a message using a MessageMapping service.
    • Constructor Detail

      • MappedMessage

        public MappedMessage​(org.eclipse.hono.util.ResourceIdentifier targetAddress,
                             io.vertx.core.buffer.Buffer payload)
        Creates a new mapping result.
        Parameters:
        targetAddress - The target address that the original message has been mapped to.
        payload - The payload that the original message has been mapped to.
        Throws:
        NullPointerException - if targetAddress is null.
      • MappedMessage

        public MappedMessage​(org.eclipse.hono.util.ResourceIdentifier targetAddress,
                             io.vertx.core.buffer.Buffer payload,
                             Map<String,​String> additionalProperties)
        Creates a new mapping result.
        Parameters:
        targetAddress - The target address that the original message has been mapped to.
        payload - The payload that the original message has been mapped to.
        additionalProperties - Extra properties that should be included with the mapped message.
        Throws:
        NullPointerException - if targetAddress is null.
    • Method Detail

      • getTargetAddress

        public org.eclipse.hono.util.ResourceIdentifier getTargetAddress()
        Gets the address that the message should be forwarded to.
        Returns:
        The address.
      • getPayload

        public io.vertx.core.buffer.Buffer getPayload()
        Gets the mapped payload.
        Returns:
        The payload.
      • getAdditionalProperties

        public Map<String,​String> getAdditionalProperties()
        Gets additional properties to be included with the mapped message.
        Returns:
        The properties (may be empty).