public class MetadataCorrelationIdSource extends java.lang.Object implements CorrelationIdSource
Implementation of CorrelationIdSource
which uses the value stored against a configureable metadata key as the
JMSCorrelationId
.
In the adapter configuration file this class is aliased as metadata-correlation-id-source which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
MetadataCorrelationIdSource() |
MetadataCorrelationIdSource(java.lang.String key) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMetadataKey()
Returns the metadata key that should be used to obtain the
JMSCorrelationId.
|
void |
processCorrelationId(AdaptrisMessage src,
javax.jms.Message dest)
If no metadata key is configured or if no value is stored against the
configured key a message is logged to this effect and no Exception is
thrown.
|
void |
processCorrelationId(javax.jms.Message src,
AdaptrisMessage dest)
Provides a
JMSCorrelationId for the
javax.jms.Message . |
void |
setMetadataKey(java.lang.String s)
Sets the metadata key that should be used to obtain the JMSCorrelationId.
|
public MetadataCorrelationIdSource()
public MetadataCorrelationIdSource(java.lang.String key)
public void processCorrelationId(AdaptrisMessage src, javax.jms.Message dest) throws javax.jms.JMSException
If no metadata key is configured or if no value is stored against the configured key a message is logged to this effect and no Exception is thrown.
processCorrelationId
in interface CorrelationIdSource
src
- the AdaptrisMessage
being processeddest
- the javax.jms.Message
to sendjavax.jms.JMSException
- if encoutered setting JMSCorrelationId
(com.adaptris.core.AdaptrisMessage, javax.jms.Message)
public void processCorrelationId(javax.jms.Message src, AdaptrisMessage dest) throws javax.jms.JMSException
CorrelationIdSource
Provides a JMSCorrelationId
for the
javax.jms.Message
.
processCorrelationId
in interface CorrelationIdSource
src
- the javax.jms.Message
that has been receiveddest
- the AdaptrisMessage
to be processedjavax.jms.JMSException
- if encoutered setting JMSCorrelationId
public java.lang.String getMetadataKey()
Returns the metadata key that should be used to obtain the JMSCorrelationId.
public void setMetadataKey(java.lang.String s)
Sets the metadata key that should be used to obtain the JMSCorrelationId.
s
- the metadata key that should be used to obtain the
JMSCorrelationId