| 1 46 package org.mr.api.jms.selector.syntax; 47 48 49 53 public final class Identifiers { 54 55 56 59 public static final String JMS_PREFIX = "JMS"; 60 61 62 65 public static final String JMSX_PREFIX = "JMSX"; 66 67 68 71 public static final String JMS_PROVIDER_PREFIX = "JMS_"; 72 73 74 77 public static final String JMS_DELIVERY_MODE = "JMSDeliveryMode"; 78 79 82 public static final String JMS_PRIORITY = "JMSPriority"; 83 84 87 public static final String JMS_MESSAGE_ID = "JMSMessageID"; 88 89 92 public static final String JMS_TIMESTAMP = "JMSTimestamp"; 93 94 97 public static final String JMS_CORRELATION_ID = "JMSCorrelationID"; 98 99 102 public static final String JMS_TYPE = "JMSType"; 103 104 107 public static final String PERSISTENT = "PERSISTENT"; 108 109 112 public static final String NON_PERSISTENT = "NON_PERSISTENT"; 113 114 115 118 private Identifiers() { 119 } 121 128 public static boolean isJMSIdentifier(final String name) { 129 boolean result = false; 130 131 if (name.startsWith(JMS_PREFIX) && !(name.startsWith(JMSX_PREFIX) || name.startsWith(JMS_PROVIDER_PREFIX))) 132 result = true; 133 134 return result; 135 } 137 138 144 public static boolean isQueryableJMSIdentifier(final String name) { 145 return (name.equals(JMS_DELIVERY_MODE) 146 || name.equals(JMS_PRIORITY) 147 || name.equals(JMS_TIMESTAMP) 148 || name.equals(JMS_MESSAGE_ID) 149 || name.equals(JMS_CORRELATION_ID) 150 || name.equals(JMS_TYPE)); 151 } 153 154 160 public static boolean isString(final String name) { 161 return (name.equals(JMS_MESSAGE_ID) 162 || name.equals(JMS_CORRELATION_ID) 163 || name.equals(JMS_TYPE) 164 || name.equals(JMS_DELIVERY_MODE)); 165 } 169 170 176 public static boolean isNumeric(final String name) { 177 return (name.equals(JMS_PRIORITY) || name.equals(JMS_TIMESTAMP)); 178 }} | Popular Tags |