public class MetadataDestination extends java.lang.Object implements MessageDrivenDestination
ProduceDestination
which concatenates message metadata to create a dynamic destination name.In the adapter configuration file this class is aliased as metadata-destination which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
MetadataDestination()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addKey(java.lang.String s)
Adds a key to the end of the list of keys to look for in the metadata.
|
java.lang.String |
getDestination(AdaptrisMessage msg)
Creates a new
ProduceDestination by concatenating
the values of configurable metadata from the AdaptrisMessage . |
java.util.List<java.lang.String> |
getKeys()
Returns the
List of keys that are used to construct the destination name. |
void |
setKeys(java.util.List<java.lang.String> l)
Sets the
List of keys that are used to construct the destination name. |
public void addKey(java.lang.String s)
Adds a key to the end of the list of keys to look for in the metadata.
s
- a key to look for in the metadatapublic java.util.List<java.lang.String> getKeys()
Returns the List
of keys that are used to construct the destination name.
List
of keys that are used to construct the destination namepublic void setKeys(java.util.List<java.lang.String> l)
Sets the List
of keys that are used to construct the destination name.
l
- the List
of keys that are used to construct the destination namepublic java.lang.String getDestination(AdaptrisMessage msg) throws CoreException
Creates a new ProduceDestination
by concatenating
the values of configurable metadata from the AdaptrisMessage
.
getDestination
in interface ProduceDestination
msg
- the message to processString
destination nameCoreException
- wrapping any underlying Exception
s