Class ClassicUuidGenerator

java.lang.Object
org.apache.camel.support.ClassicUuidGenerator
All Implemented Interfaces:
org.apache.camel.spi.UuidGenerator

public class ClassicUuidGenerator extends Object implements org.apache.camel.spi.UuidGenerator
The classic (Camel 2.x) UuidGenerator optimized for Camel usage.
  • Constructor Details

    • ClassicUuidGenerator

      public ClassicUuidGenerator(String prefix)
    • ClassicUuidGenerator

      public ClassicUuidGenerator()
  • Method Details

    • getHostName

      public static String getHostName()
      As we have to find the hostname as a side-affect of generating a unique stub, we allow it's easy retrieval here
      Returns:
      the local host name
    • sanitizeHostName

      public static String sanitizeHostName(String hostName)
    • generateUuid

      public String generateUuid()
      Specified by:
      generateUuid in interface org.apache.camel.spi.UuidGenerator
    • generateSanitizedId

      public String generateSanitizedId()
      Generate a unique ID - that is friendly for a URL or file system
      Returns:
      a unique id
    • generateSanitizedId

      public static String generateSanitizedId(String id)
      Ensures that the id is friendly for a URL or file system
      Parameters:
      id - the unique id
      Returns:
      the id as file friendly id