Class IdGenerator

java.lang.Object
org.apache.qpid.protonj2.client.util.IdGenerator

public class IdGenerator extends Object
Generator for Globally unique Strings used to identify resources within a given Connection.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The default Id prefix applied to all new Id values rendered from an IdGenerator.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Construct an IdGenerator using the default prefix value.
    Construct an IdGenerator using the given prefix value as the initial prefix entry for all Ids generated (default is 'ID:').
  • Method Summary

    Modifier and Type
    Method
    Description
    Generate a unique id using the configured characteristics.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • IdGenerator

      public IdGenerator(String prefix)
      Construct an IdGenerator using the given prefix value as the initial prefix entry for all Ids generated (default is 'ID:').
      Parameters:
      prefix - The prefix value that is applied to all generated IDs.
    • IdGenerator

      public IdGenerator()
      Construct an IdGenerator using the default prefix value.
  • Method Details

    • generateId

      public String generateId()
      Generate a unique id using the configured characteristics.
      Returns:
      a newly generated unique id value.