SimpleString.startsWith
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.apache.activemq.artemis.api.core.SimpleString.startsWith(Showing top 15 results out of 315)

  • Common ways to obtain SimpleString
private void myMethod () {
SimpleString s =
  • UUIDGenerator.getInstance().generateSimpleStringUUID()
  • new SimpleString(UUID.randomUUID().toString())
  • String string;SimpleString.toSimpleString(string)
  • Smart code suggestions by Codota
}
origin: wildfly/wildfly

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);
 }
}
origin: wildfly/wildfly

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();
 }
}
origin: wildfly/wildfly

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;
}
origin: org.apache.activemq/artemis-core-client

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);
}
origin: apache/activemq-artemis

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;
 }
}
origin: org.apache.activemq/artemis-commons

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();
 }
}
origin: org.apache.activemq/artemis-core-client

  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;
  }
}
origin: apache/activemq-artemis

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;
}
origin: org.apache.activemq/artemis-core-client

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;
}
origin: apache/activemq-artemis

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;
}
origin: apache/activemq-artemis

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);
}
origin: apache/activemq-artemis

  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;
  }
}
origin: apache/activemq-artemis

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);
}
origin: apache/activemq-artemis

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();
 }
}
origin: apache/activemq-artemis

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;
}
org.apache.activemq.artemis.api.coreSimpleStringstartsWith

Javadoc

returns true if the SimpleString parameter starts with the same data as this one. false if not.

Popular methods of SimpleString

  • toString
  • <init>
    creates a SimpleString from a byte array
  • toSimpleString
  • equals
  • length
  • concat
    Concatenates 2 SimpleString's
  • getData
    returns the underlying byte array of this SimpleString
  • hashCode
  • sizeof
    returns the size of this SimpleString
  • sizeofNullableString
    returns the size of a SimpleString which could be null
  • sizeofString
    returns the size of a SimpleString
  • writeSimpleString
  • sizeofString,
  • writeSimpleString,
  • readNullableSimpleString,
  • readSimpleString,
  • subSeq,
  • writeNullableSimpleString,
  • addSimpleStringPart,
  • contains,
  • splitWithCachedString

Popular classes and methods

  • getOriginalFilename (MultipartFile)
  • getContentResolver (Context)
  • compareTo (BigDecimal)
    Compares this BigDecimal with val. Returns one of the three values 1, 0, or -1. The method behaves a
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)