For IntelliJ IDEA,
Android Studio or Eclipse



private void myMethod () {SimpleString s =
UUIDGenerator.getInstance().generateSimpleStringUUID()
new SimpleString(UUID.randomUUID().toString())
String string;SimpleString.toSimpleString(string)
- Smart code suggestions by Codota
}
public static void clearProperties(Message message) { List<SimpleString> toRemove = new ArrayList<>(); for (SimpleString propName : message.getPropertyNames()) { if (!propName.startsWith(JMS) || propName.startsWith(JMSX) || propName.startsWith(JMS_)) { toRemove.add(propName); } } for (SimpleString propName : toRemove) { message.removeProperty(propName); } }
private synchronized void doPutValue(final SimpleString key, final PropertyValue value) { if (key.startsWith(AMQ_PROPNAME)) { internalProperties = true; } PropertyValue oldValue = properties.put(key, value); if (oldValue != null) { size += value.encodeSize() - oldValue.encodeSize(); } else { size += SimpleString.sizeofString(key) + value.encodeSize(); } }
public static Set<String> getPropertyNames(Message message) { HashSet<String> set = new HashSet<>(); for (SimpleString propName : message.getPropertyNames()) { if ((!propName.startsWith(JMS) || propName.startsWith(JMSX) || propName.startsWith(JMS_)) && !propName.startsWith(CONNECTION_ID_PROPERTY_NAME)) { set.add(propName.toString()); } } set.add(JMSXDELIVERYCOUNT); return set; }
public static Pair<SimpleString, EnumSet<RoutingType>> getAddressAndRoutingTypes(SimpleString address, EnumSet<RoutingType> defaultRoutingTypes, Map<SimpleString, RoutingType> prefixes) { for (Map.Entry<SimpleString, RoutingType> entry : prefixes.entrySet()) { if (address.startsWith(entry.getKey())) { return new Pair<>(removePrefix(address, entry.getKey()), EnumSet.of(entry.getValue())); } } return new Pair<>(address, defaultRoutingTypes); }
private static SimpleString jmsPrefixOf(SimpleString address) { if (address.startsWith(OLD_QUEUE_PREFIX)) { return OLD_QUEUE_PREFIX; } else if (address.startsWith(OLD_TOPIC_PREFIX)) { return OLD_TOPIC_PREFIX; } else { return null; } }
private synchronized void doPutValue(final SimpleString key, final PropertyValue value) { if (key.startsWith(AMQ_PROPNAME)) { internalProperties = true; } PropertyValue oldValue = properties.put(key, value); if (oldValue != null) { size += value.encodeSize() - oldValue.encodeSize(); } else { size += SimpleString.sizeofString(key) + value.encodeSize(); } }
public static SimpleString getOldPrefixedAddress(SimpleString address, RoutingType routingType) { if (routingType == RoutingType.MULTICAST && !address.startsWith(OLD_TOPIC_PREFIX)) { return OLD_TOPIC_PREFIX.concat(address); } else if (routingType == RoutingType.ANYCAST && !address.startsWith(OLD_QUEUE_PREFIX)) { return OLD_QUEUE_PREFIX.concat(address); } return address; } }
public static SimpleString getAddress(SimpleString address, Map<SimpleString, RoutingType> prefixes) { for (Map.Entry<SimpleString, RoutingType> entry : prefixes.entrySet()) { if (address.startsWith(entry.getKey())) { return removePrefix(address, entry.getKey()); } } return address; }
public static Set<String> getPropertyNames(Message message) { HashSet<String> set = new HashSet<>(); for (SimpleString propName : message.getPropertyNames()) { if ((!propName.startsWith(JMS) || propName.startsWith(JMSX) || propName.startsWith(JMS_)) && !propName.startsWith(CONNECTION_ID_PROPERTY_NAME) && !propName.equals(Message.HDR_ROUTING_TYPE) && !propName.startsWith(Message.HDR_ROUTE_TO_IDS)) { set.add(propName.toString()); } } set.add(JMSXDELIVERYCOUNT); return set; }
public static SimpleString getAddress(SimpleString address, Map<SimpleString, RoutingType> prefixes) { for (Map.Entry<SimpleString, RoutingType> entry : prefixes.entrySet()) { if (address.startsWith(entry.getKey())) { return removePrefix(address, entry.getKey()); } } return address; }
public static Pair<SimpleString, EnumSet<RoutingType>> getAddressAndRoutingTypes(SimpleString address, EnumSet<RoutingType> defaultRoutingTypes, Map<SimpleString, RoutingType> prefixes) { for (Map.Entry<SimpleString, RoutingType> entry : prefixes.entrySet()) { if (address.startsWith(entry.getKey())) { return new Pair<>(removePrefix(address, entry.getKey()), EnumSet.of(entry.getValue())); } } return new Pair<>(address, defaultRoutingTypes); }
public static SimpleString getOldPrefixedAddress(SimpleString address, RoutingType routingType) { if (routingType == RoutingType.MULTICAST && !address.startsWith(OLD_TOPIC_PREFIX)) { return OLD_TOPIC_PREFIX.concat(address); } else if (routingType == RoutingType.ANYCAST && !address.startsWith(OLD_QUEUE_PREFIX)) { return OLD_QUEUE_PREFIX.concat(address); } return address; } }
public static Pair<SimpleString, EnumSet<RoutingType>> getAddressAndRoutingTypes(SimpleString address, EnumSet<RoutingType> defaultRoutingTypes, Map<SimpleString, RoutingType> prefixes) { for (Map.Entry<SimpleString, RoutingType> entry : prefixes.entrySet()) { if (address.startsWith(entry.getKey())) { return new Pair<>(removePrefix(address, entry.getKey()), EnumSet.of(entry.getValue())); } } return new Pair<>(address, defaultRoutingTypes); }
private synchronized void doPutValue(final SimpleString key, final PropertyValue value) { if (key.startsWith(AMQ_PROPNAME)) { internalProperties = true; } PropertyValue oldValue = properties.put(key, value); if (oldValue != null) { size += value.encodeSize() - oldValue.encodeSize(); } else { size += SimpleString.sizeofString(key) + value.encodeSize(); } }
public static Set<String> getPropertyNames(Message message) { HashSet<String> set = new HashSet<>(); for (SimpleString propName : message.getPropertyNames()) { if ((!propName.startsWith(JMS) || propName.startsWith(JMSX) || propName.startsWith(JMS_)) && !propName.startsWith(CONNECTION_ID_PROPERTY_NAME) && !propName.equals(Message.HDR_ROUTING_TYPE) && !propName.startsWith(Message.HDR_ROUTE_TO_IDS)) { set.add(propName.toString()); } } set.add(JMSXDELIVERYCOUNT); return set; }