Interface Message

    • Method Detail

      • getBody

        Object getBody()
        Returns the body of the message.
        Returns:
        message body
      • getClientId

        String getClientId()
        Returns the client id indicating the client that sent the message.
        Returns:
        client id
      • getDestination

        String getDestination()
        Returns the destination that the message targets.
        Returns:
        destination
      • getHeader

        Object getHeader​(String name)
        Returns a header value corresponding to the passed header name.
        Parameters:
        name - header name
        Returns:
        header value
      • getHeaders

        Map<String,​Object> getHeaders()
        Returns the headers for the message.
        Returns:
        headers
      • getMessageId

        String getMessageId()
        Returns the unique message id.
        Returns:
        message id
      • getTimestamp

        long getTimestamp()
        Returns the timestamp for the message.
        Returns:
        timestamp
      • getTimeToLive

        long getTimeToLive()
        Returns the time to live for the message.
        Returns:
        time to live
      • headerExists

        boolean headerExists​(String name)
        Tests whether a header with the passed name exists.
        Parameters:
        name - header name
        Returns:
        true if header exists, false otherwise
      • setBody

        void setBody​(Object value)
        Sets the body of the message.
        Parameters:
        value - body
      • setClientId

        void setClientId​(String value)
        Sets the client id indicating the client that sent the message.
        Parameters:
        value - client id
      • setDestination

        void setDestination​(String value)
        Sets the destination that the message targets.
        Parameters:
        value - destination
      • setHeader

        void setHeader​(String name,
                       Object value)
        Sets a header on the message.
        Parameters:
        name - header name
        value - header value
      • setHeaders

        void setHeaders​(Map<String,​Object> values)
        Sets the headers for the message.
        Parameters:
        values - header values
      • setMessageId

        void setMessageId​(String value)
        Sets the unique message id.
        Parameters:
        value - message id
      • setTimestamp

        void setTimestamp​(long value)
        Sets the timestamp for the message.
        Parameters:
        value - timestamp
      • setTimeToLive

        void setTimeToLive​(long value)
        Sets the time to live for the message.
        Parameters:
        value - ttl