Package org.apache.qpid.jms.util
Class IdGenerator
- java.lang.Object
-
- org.apache.qpid.jms.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 StringDEFAULT_PREFIXstatic StringPROPERTY_IDGENERATOR_HOST_PREFIX
-
Constructor Summary
Constructors Constructor Description IdGenerator()Construct an IdGenerator using the default prefix value.IdGenerator(String prefix)Construct an IdGenerator using the given prefix value as the initial prefix entry for all Ids generated (default is 'ID:').
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgenerateId()Generate a unique id using the configured characteristics.protected static StringsanitizeHostName(String hostName)
-
-
-
Field Detail
-
DEFAULT_PREFIX
public static final String DEFAULT_PREFIX
- See Also:
- Constant Field Values
-
PROPERTY_IDGENERATOR_HOST_PREFIX
public static final String PROPERTY_IDGENERATOR_HOST_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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.
-
-