Package com.adaptris.core.msmq.javonet
Class SafeMessageIdProperty
- java.lang.Object
-
- com.adaptris.core.msmq.javonet.MessageProperty
-
- com.adaptris.core.msmq.javonet.MessageIdProperty
-
- com.adaptris.core.msmq.javonet.SafeMessageIdProperty
-
public class SafeMessageIdProperty extends MessageIdProperty
Copies the AdaptrisMessage uniqueId to and from MSMQ Message fields.In some environments the
System.Messaging.Message.Id
property (and CorrelationId property) may not be safe to use as the AdaptrisMessage ID (it may contain a\
which will cause problems when writing out to the filesystem. This class simply replaces all invalid characters with a-
instead.Note that
System.Messaging.Message
does not allow you to set theId
property; it is always auto-assigned. As a result, if you attempt to map the AdaptrisMessage ID to this field, it will fail.- See Also:
MessageIdProperty
In the adapter configuration file this class is aliased as javonet-msmq-safe-message-id which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.adaptris.core.msmq.javonet.MessageProperty
MessageProperty.Property
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.msmq.javonet.MessageProperty
logR
-
-
Constructor Summary
Constructors Constructor Description SafeMessageIdProperty()
SafeMessageIdProperty(MessageProperty.Property field)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
format(java.lang.String name)
-
Methods inherited from class com.adaptris.core.msmq.javonet.MessageIdProperty
mapProperty, mapProperty
-
Methods inherited from class com.adaptris.core.msmq.javonet.MessageProperty
getNullConverter, getPropertyName, nullConverter, setNullConverter, setPropertyName
-
-
-
-
Constructor Detail
-
SafeMessageIdProperty
public SafeMessageIdProperty()
-
SafeMessageIdProperty
public SafeMessageIdProperty(MessageProperty.Property field)
-
-
Method Detail
-
format
protected java.lang.String format(java.lang.String name)
- Overrides:
format
in classMessageIdProperty
-
-