Class AmqpJmsMessagePropertyIntercepter


  • public class AmqpJmsMessagePropertyIntercepter
    extends java.lang.Object
    Utility class used to intercept calls to Message property sets and gets and map the correct AMQP fields to the property name being accessed.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void clearProperties​(AmqpJmsMessageFacade message)
      For each of the currently configured message property intercepter instances clear or reset the value to its default.
      static java.util.Set<java.lang.String> getAllPropertyNames()
      For each of the currently configured message property intercepter instance a string key value is inserted into an Set and returned.
      static java.lang.Object getProperty​(AmqpJmsMessageFacade message, java.lang.String name)
      Static get method that takes a property name and gets the value either via a registered property get object or through the AmqpJmsMessageFacade getProperty method.
      static java.util.Set<java.lang.String> getPropertyNames​(AmqpJmsMessageFacade message)
      For each of the currently configured message property intercepter instance a string key value is inserted into an Set and returned if the property has a value and is available for a read operation.
      static boolean propertyExists​(AmqpJmsMessageFacade message, java.lang.String name)
      Static query method to determine if a specific property exists in the given message.
      static void setProperty​(AmqpJmsMessageFacade message, java.lang.String name, java.lang.Object value)
      Static set method that takes a property name and sets the value either via a registered property set object or through the AmqpJmsMessageFacade setProperty method.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AmqpJmsMessagePropertyIntercepter

        public AmqpJmsMessagePropertyIntercepter()
    • Method Detail

      • getProperty

        public static java.lang.Object getProperty​(AmqpJmsMessageFacade message,
                                                   java.lang.String name)
                                            throws jakarta.jms.JMSException
        Static get method that takes a property name and gets the value either via a registered property get object or through the AmqpJmsMessageFacade getProperty method.
        Parameters:
        message - the AmqpJmsMessageFacade instance to read from
        name - the property name that is being requested.
        Returns:
        the correct value either mapped to an attribute of a Message or a message property.
        Throws:
        jakarta.jms.JMSException - if an error occurs while reading the defined property.
      • setProperty

        public static void setProperty​(AmqpJmsMessageFacade message,
                                       java.lang.String name,
                                       java.lang.Object value)
                                throws jakarta.jms.JMSException
        Static set method that takes a property name and sets the value either via a registered property set object or through the AmqpJmsMessageFacade setProperty method.
        Parameters:
        message - the AmqpJmsMessageFacade instance to write to.
        name - the property name that is being written.
        value - the new value to assign for the named property.
        Throws:
        jakarta.jms.JMSException - if an error occurs while writing the defined property.
      • propertyExists

        public static boolean propertyExists​(AmqpJmsMessageFacade message,
                                             java.lang.String name)
                                      throws jakarta.jms.JMSException
        Static query method to determine if a specific property exists in the given message.
        Parameters:
        message - the AmqpJmsMessageFacade instance to write to.
        name - the property name that is being checked.
        Returns:
        true if the message contains the given property.
        Throws:
        jakarta.jms.JMSException - if an error occurs while inspecting the defined property.
      • getAllPropertyNames

        public static java.util.Set<java.lang.String> getAllPropertyNames()
        For each of the currently configured message property intercepter instance a string key value is inserted into an Set and returned.
        Returns:
        a Set<String> containing the names of all intercepted properties.
      • getPropertyNames

        public static java.util.Set<java.lang.String> getPropertyNames​(AmqpJmsMessageFacade message)
        For each of the currently configured message property intercepter instance a string key value is inserted into an Set and returned if the property has a value and is available for a read operation. The Set returned may be manipulated by the receiver without impacting the facade, and an empty set will be returned if there are no matching properties.
        Parameters:
        message - The message being enumerated.
        Returns:
        a Set<String> containing the names of all intercepted properties with a value.
      • clearProperties

        public static void clearProperties​(AmqpJmsMessageFacade message)
                                    throws jakarta.jms.JMSException
        For each of the currently configured message property intercepter instances clear or reset the value to its default.
        Parameters:
        message - the AmqpJmsMessageFacade instance to read from
        Throws:
        jakarta.jms.JMSException - if an error occurs while validating the defined property.