Class SolaceJcsmpMetadataMapping

java.lang.Object
com.adaptris.core.jcsmp.solace.SolaceJcsmpMetadataMapping

@ComponentProfile(summary="Used with the message translator to map Solace headers to Interlok metadata and the reverse.", tag="solace,jcsmp", since="3.9.3") public class SolaceJcsmpMetadataMapping extends Object

Used with the message translator to move headers and metedata between the Solace and Adaptris messages.

When translating from Solace to Adaptris messages, the header keys will be used to generate a getter call. For example, if we set the headerKey to "MessageId" and the metadataKey to "message-id" then Interlok will call the getter getMessageId(), the value for which will be copied into the Adaptris Message metadata item with the key "message-id".

When translating from Adaptris to Solace messages, the header keys will be used to generate a setter call. For example, if we set the headerKey to "MessageId" and the metadataKey to "message-id" then Interlok will call the setter setMessageId(value), the value for which will come from the Adaptris Message metadata item with the kay "message-id".

In the adapter configuration file this class is aliased as solace-jcsmp-metadata-mapping which is the preferred alternative to the fully qualified classname when building your configuration.

  • Constructor Details

    • SolaceJcsmpMetadataMapping

      public SolaceJcsmpMetadataMapping()
    • SolaceJcsmpMetadataMapping

      public SolaceJcsmpMetadataMapping(String metadataKey, String headerKey)
    • SolaceJcsmpMetadataMapping

      public SolaceJcsmpMetadataMapping(String metadataKey, String headerKey, String dataType)
  • Method Details

    • getMetadataKey

      public String getMetadataKey()
      Set the key of the Adaptris message metadata item.
    • setMetadataKey

      public void setMetadataKey(String metadataKey)
      Set the key of the Adaptris message metadata item.
      Parameters:
      metadataKey -
    • getHeaderKey

      public String getHeaderKey()
      Set the key of the Solace message header item. This will match the getter/setter of the property name of the Solace BytesXmlMessage.
    • setHeaderKey

      public void setHeaderKey(String headerKey)
      Set the key of the Solace message header item. This will match the getter/setter of the property name of the Solace BytesXmlMessage.
      Parameters:
      headerKey -
    • getDataType

      public String getDataType()
      If left null, it is assumed that the Solace property value is a String, otherwise specify "Integer / Boolean / Long"
    • setDataType

      public void setDataType(String dataType)
      If left null, it is assumed that the Solace property value is a String, otherwise specify "Integer / Boolean / Long"
      Parameters:
      dataType -