Class AmqpJmsMessagePropertyIntercepter
java.lang.Object
org.apache.qpid.jms.provider.amqp.message.AmqpJmsMessagePropertyIntercepter
Utility class used to intercept calls to Message property sets and gets and map the
correct AMQP fields to the property name being accessed.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclearProperties(AmqpJmsMessageFacade message) For each of the currently configured message property intercepter instances clear or reset the value to its default.For each of the currently configured message property intercepter instance a string key value is inserted into an Set and returned.static ObjectgetProperty(AmqpJmsMessageFacade message, 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.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 booleanpropertyExists(AmqpJmsMessageFacade message, String name) Static query method to determine if a specific property exists in the given message.static voidsetProperty(AmqpJmsMessageFacade message, String name, 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.
-
Constructor Details
-
AmqpJmsMessagePropertyIntercepter
public AmqpJmsMessagePropertyIntercepter()
-
-
Method Details
-
getProperty
public static Object getProperty(AmqpJmsMessageFacade message, 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 fromname- 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, String name, 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, 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
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
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
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.
-