logo

 

ResponseMaster Advanced Topics
Parameterized Message Fields
Contents
  1. Overview
  2. Set By Other
  3. Message Header
  4. Regex Extractor
1. Overview
This document describes the Message Field Classes that are provided with ResponseMaster that can be configured to provide custom fields without writing code.
2. Set By Other
This message field class doesn't do anything...it just waits for another message field to set its value.
Example config:
<MessageField>
 <Name>MyField</Name>
 <DataTypeClassName>java.lang.String</DataTypeClassName>
 <FetchingClassName>com.extrememessaging.ResponseMaster.MessageFields.SetByOther</FetchingClassName>
 <Parameter>
  <FieldParameters>
   <FieldName>MyField</FieldName>
   <ExpectedType>java.lang.String</ExpectedType>
   <SettingFieldName>OtherField</SettingFieldName>
  </FieldParameters>
 </Parameter>
 <NotNull>0</NotNull>
 <ConstantLength>0</ConstantLength>
 <DefaultLength>100</DefaultLength>
 <ExcludeFromFieldList>0</ExcludeFromFieldList>
</MessageField>
FieldName
Must match the entry in "Name"
Required.
ExpectedType
The datatype of the data the field will contain.
Default=java.lang.String
Optional.
SettingFieldName
The name of the field that sets the value of this field.
Default=null
Optional.
3. Message Header
This message field class extracts headers from the bounce and any messages attached to it.
Example config:
<MessageField>
 <Name>MyHeader</Name>
 <DataTypeClassName>java.lang.String</DataTypeClassName>
 <FetchingClassName>com.extrememessaging.ResponseMaster.MessageFields.MessageHeader</FetchingClassName>
 <Parameter>
  <FieldParameters>
   <HeaderName>X-MyHeader</HeaderName>
   <Delimiter>,</Delimiter>
   <Algorithm>All</Algorithm>
  </FieldParameters>
 </Parameter>
 <NotNull>0</NotNull>
 <ConstantLength>0</ConstantLength>
 <DefaultLength>100</DefaultLength>
 <ExcludeFromFieldList>0</ExcludeFromFieldList>
</MessageField>
HeaderName
The name of the header to look for.
Required.
Delimiter
The separator to use between items if there are more than one.
Default= ;
Optional.
Algorithm
Determines which header(s) are returned.  Possible values:
First - Return the first one that is found.
All - Return all of the items that are found.
Default=First
Optional.
4. Regex Extractor
This message field applies a user-specified regular expression to one of the other message fields.
Example config:
<MessageField>
 <Name>MyRegex</Name>
 <DataTypeClassName>java.lang.String</DataTypeClassName>
 <FetchingClassName>com.extrememessaging.ResponseMaster.MessageFields.RegexExtractor</FetchingClassName>
 <Parameter>
  <FieldParameters>
   <SourceFieldName>Body</SourceFieldName>
   <Delimiter>;</Delimiter>
   <Regex>MessageID:([0-9a-f]{1,20}) </Regex>
  </FieldParameters>
 </Parameter>
 <NotNull>0</NotNull>
 <ConstantLength>0</ConstantLength>
 <DefaultLength>100</DefaultLength>
 <ExcludeFromFieldList>0</ExcludeFromFieldList>
</MessageField>
SourceFieldName
The name of the field that the regex should be applied to.
Required.
Delimiter
The separator to use between items if there are more than one.
Default= ;
Optional.
Regex
The regular expression to apply to the source field.
Note: You MUST indicate the group to extract by using parentheses.
Note: The regex uses Perl5 syntax.
Required.

Please contact support@extreme-messaging.com if you have any questions.