Class SelectorTranslator

java.lang.Object
org.apache.activemq.artemis.utils.SelectorTranslator

public class SelectorTranslator extends Object
This class converts a JMS selector expression into an ActiveMQ Artemis core filter expression.

JMS selector and ActiveMQ Artemis filters use the same syntax but have different identifiers.

We basically just need to replace the JMS header and property Identifier names with the corresponding ActiveMQ Artemis field and header Identifier names.

We must be careful not to substitute any literals, or identifiers whose name contains the name of one we want to substitute.

This makes it less trivial than a simple search and replace.

  • Constructor Details

    • SelectorTranslator

      public SelectorTranslator()
  • Method Details

    • convertToActiveMQFilterString

      public static String convertToActiveMQFilterString(String selectorString)
    • parse

      public static String parse(String input, String match, String replace)