public final class MarshalledClassDestination extends java.lang.Object implements MessageDrivenDestination
ProduceDestination
.
For a given AdaptrisMessage object that is a marshalled class, this
destination will unmarshall the class, check against the
KeyValuePairSet
that has been configured and return the value
associated with the classname.
In the adapter configuration file this class is aliased as marshalled-class-destination which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
MarshalledClassDestination() |
Modifier and Type | Method and Description |
---|---|
KeyValuePairSet |
getClassMappings()
Get the mappings.
|
java.lang.String |
getDefaultDestination()
Get the default destination.
|
java.lang.String |
getDestination(AdaptrisMessage msg)
Get the destination based on the type of object this AdaptrisMessage is.
|
AdaptrisMarshaller |
getMarshaller()
Get the marshaller used to unmarshall the AdaptrisMessage object.
|
void |
setClassMappings(KeyValuePairSet set)
Set the mappings.
|
void |
setDefaultDestination(java.lang.String d)
Set the default destination to be used if no mapping could be found.
|
void |
setMarshaller(AdaptrisMarshaller m)
Set the marshaller to be used to unmarshaller the AdaptrisMessage object.
|
public MarshalledClassDestination()
Object.Object()
public java.lang.String getDestination(AdaptrisMessage msg)
The following rules will apply for the purposes of resolving a destination map.
getDestination
in interface ProduceDestination
msg
- the AdaptrisMessage
for which the name is being generatedProduceDestination.getDestination(AdaptrisMessage)
public void setClassMappings(KeyValuePairSet set)
set
- the set of mappingspublic KeyValuePairSet getClassMappings()
public AdaptrisMarshaller getMarshaller()
AdaptrisMarshaller
public void setMarshaller(AdaptrisMarshaller m)
m
- the marshaller (default is DefaultMarshaller.getDefaultMarshaller()
)AdaptrisMarshaller
public void setDefaultDestination(java.lang.String d)
d
- the default destination.public java.lang.String getDefaultDestination()