public class JmsMessagePropertyIntercepter extends Object
Constructor and Description |
---|
JmsMessagePropertyIntercepter() |
Modifier and Type | Method and Description |
---|---|
static void |
clearProperties(JmsMessage message,
boolean excludeStandardJMSHeaders)
For each of the currently configured message property intercepter instances clear or
reset the value to its default.
|
static Set<String> |
getAllPropertyNames(JmsMessage message)
For each of the currently configured message property intercepter instance a
string key value is inserted into an Set and returned.
|
static Object |
getProperty(JmsMessage 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 JmsMessageFacade getProperty
method.
|
static Set<String> |
getPropertyNames(JmsMessage message,
boolean excludeStandardJMSHeaders)
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(JmsMessage message,
String name)
Static inspection method to determine if a named property exists for a given message.
|
static void |
setProperty(JmsMessage 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 JmsMessageFacade setProperty
method.
|
public static Object getProperty(JmsMessage message, String name) throws javax.jms.JMSException
message
- the JmsMessage instance to read fromname
- the property name that is being requested.javax.jms.JMSException
- if an error occurs while reading the defined property.public static void setProperty(JmsMessage message, String name, Object value) throws javax.jms.JMSException
message
- the JmsMessage instance to write to.name
- the property name that is being written.value
- the new value to assign for the named property.javax.jms.JMSException
- if an error occurs while writing the defined property.public static boolean propertyExists(JmsMessage message, String name) throws javax.jms.JMSException
message
- the JmsMessage instance to read fromname
- the property name that is being inspected.javax.jms.JMSException
- if an error occurs while validating the defined property.public static void clearProperties(JmsMessage message, boolean excludeStandardJMSHeaders) throws javax.jms.JMSException
message
- the JmsMessage instance to read fromexcludeStandardJMSHeaders
- whether the standard JMS header names should be excluded from the returned setjavax.jms.JMSException
- if an error occurs while validating the defined property.public static Set<String> getAllPropertyNames(JmsMessage message) throws javax.jms.JMSException
message
- the JmsMessage instance to read property names from.Set<String>
containing the names of all intercepted properties.javax.jms.JMSException
- if an error occurs while gathering the message property names.public static Set<String> getPropertyNames(JmsMessage message, boolean excludeStandardJMSHeaders) throws javax.jms.JMSException
message
- the JmsMessage instance to read fromexcludeStandardJMSHeaders
- whether the standard JMS header names should be excluded from the returned setSet<String>
containing the names of all intercepted properties with a value.javax.jms.JMSException
- if an error occurs while gathering the message property names.Copyright © 2013–2016 The Apache Software Foundation. All rights reserved.