1 43 44 package org.exolab.jms.selector; 45 46 47 53 public final class Identifiers { 54 55 58 public static final String JMS_PREFIX = "JMS"; 59 60 63 public static final String JMSX_PREFIX = "JMSX"; 64 65 68 public static final String JMS_PROVIDER_PREFIX = "JMS_"; 69 70 73 public static final String JMS_DELIVERY_MODE = "JMSDeliveryMode"; 74 75 78 public static final String JMS_PRIORITY = "JMSPriority"; 79 80 83 public static final String JMS_MESSAGE_ID = "JMSMessageID"; 84 85 88 public static final String JMS_TIMESTAMP = "JMSTimestamp"; 89 90 93 public static final String JMS_CORRELATION_ID = "JMSCorrelationID"; 94 95 98 public static final String JMS_TYPE = "JMSType"; 99 100 103 public static final String PERSISTENT = "PERSISTENT"; 104 105 108 public static final String NON_PERSISTENT = "NON_PERSISTENT"; 109 110 111 114 private Identifiers() { 115 } 116 117 125 public static boolean isJMSIdentifier(final String name) { 126 boolean result = false; 127 if (name.startsWith(JMS_PREFIX) 128 && !(name.startsWith(JMSX_PREFIX) 129 || name.startsWith(JMS_PROVIDER_PREFIX))) { 130 result = true; 131 } 132 return result; 133 } 134 135 142 public static boolean isQueryableJMSIdentifier(final String name) { 143 return (name.equals(JMS_DELIVERY_MODE) 144 || name.equals(JMS_PRIORITY) 145 || name.equals(JMS_TIMESTAMP) 146 || name.equals(JMS_MESSAGE_ID) 147 || name.equals(JMS_CORRELATION_ID) 148 || name.equals(JMS_TYPE)); 149 } 150 151 158 public static boolean isString(final String name) { 159 return (name.equals(JMS_MESSAGE_ID) 160 || name.equals(JMS_CORRELATION_ID) 161 || name.equals(JMS_TYPE) 162 || name.equals(JMS_DELIVERY_MODE)); 163 } 166 167 174 public static boolean isNumeric(final String name) { 175 return (name.equals(JMS_PRIORITY) 176 || name.equals(JMS_TIMESTAMP)); 177 } 178 179 } | Popular Tags |