Class BaseMessageFilter


  • public class BaseMessageFilter
    extends Object
    A basic filter for checking existence and correctness of mandatory message properties.
    • Constructor Detail

      • BaseMessageFilter

        protected BaseMessageFilter()
        Empty default constructor.
    • Method Detail

      • verifyStandardProperties

        protected static final boolean verifyStandardProperties​(ResourceIdentifier linkTarget,
                                                                org.apache.qpid.proton.message.Message msg)
        Checks whether an AMQP message contains required standard properties.

        This method checks if the message contains a valid device identifier using the hasValidDeviceId(ResourceIdentifier, Message) method.

        After successful verification the following properties are added to the message's annotations:

        Parameters:
        linkTarget - The resource path to check the message's properties against for consistency.
        msg - The AMQP 1.0 message to perform the checks on.
        Returns:
        true if the message passes all checks.
      • hasValidDeviceId

        protected static final boolean hasValidDeviceId​(ResourceIdentifier linkTarget,
                                                        org.apache.qpid.proton.message.Message msg)
        Checks if an AMQP message contains a valid device identifier.
        Parameters:
        linkTarget - The resource path to check the message's properties against for consistency.
        msg - The AMQP 1.0 message to perform the checks on.
        Returns:
        true if the following conditions are met:
      • hasCorrelationId

        protected static final boolean hasCorrelationId​(org.apache.qpid.proton.message.Message msg)
        Checks if an AMQP message contains either a message ID or a correlation ID.
        Parameters:
        msg - The message.
        Returns:
        true if the message has an ID that can be used for correlation.