Class IdGenerator

java.lang.Object
org.apache.cxf.wsn.util.IdGenerator

public class IdGenerator extends Object
Generator for Globally unique Strings.
  • Constructor Details

    • IdGenerator

      public IdGenerator()
    • IdGenerator

      public IdGenerator(String prefix)
      Construct an IdGenerator
  • 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 retrevial here
      Returns:
      the local host name
    • generateId

      public String generateId()
      Generate a unqiue id
      Returns:
      a unique id
    • generateSanitizedId

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