public class ExceptionDestination extends java.lang.Object implements MessageDrivenDestination
Implementation of ProduceDestination
which matches the Exception class in object metadata to generate a destination
string.
In the adapter configuration file this class is aliased as exception-destination which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
ExceptionDestination() |
ExceptionDestination(java.lang.String defaultDestination,
KeyValuePairCollection mappings) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDefaultDestination() |
java.lang.String |
getDestination(AdaptrisMessage msg)
Returns a
String destination name. |
KeyValuePairCollection |
getExceptionMapping() |
void |
setDefaultDestination(java.lang.String s)
Set the default destination when no exceptions match.
|
void |
setExceptionMapping(KeyValuePairCollection mapping)
Set the mapping for exception and destinations.
|
public ExceptionDestination()
public ExceptionDestination(java.lang.String defaultDestination, KeyValuePairCollection mappings)
public java.lang.String getDestination(AdaptrisMessage msg) throws CoreException
ProduceDestination
Returns a String
destination name. Implementations may or may not use the AdaptrisMessage
to
dynamically generate the name.
getDestination
in interface ProduceDestination
msg
- the AdaptrisMessage
for which the name is being generatedCoreException
- wrapping any underlying Exception
public KeyValuePairCollection getExceptionMapping()
public void setExceptionMapping(KeyValuePairCollection mapping)
mapping
- the mapping.public java.lang.String getDefaultDestination()
public void setDefaultDestination(java.lang.String s)
s
- the default destination.