Package com.adaptris.util
Class GuidGenerator
- java.lang.Object
-
- com.adaptris.util.GuidGenerator
-
- All Implemented Interfaces:
IdGenerator
- Direct Known Subclasses:
GuidGeneratorWithTime
,SafeGuidGenerator
public class GuidGenerator extends java.lang.Object implements IdGenerator
Creates a GUID usingUUID.randomUUID()
.In the adapter configuration file this class is aliased as guid-generator which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Constructor Summary
Constructors Constructor Description GuidGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
create(java.lang.Object msg)
Create a unique id based on the object.java.lang.String
getUUID()
Get the next unique ID.java.lang.String
safeUUID()
Get a safe UUID
-
-
-
Method Detail
-
getUUID
public java.lang.String getUUID()
Get the next unique ID.- Returns:
- the next unique ID
-
create
public java.lang.String create(java.lang.Object msg)
Description copied from interface:IdGenerator
Create a unique id based on the object.- Specified by:
create
in interfaceIdGenerator
- Parameters:
msg
- the object to create an id around- Returns:
- a unique id for use.
- See Also:
IdGenerator.create(java.lang.Object)
-
safeUUID
public java.lang.String safeUUID()
Get a safe UUID- Returns:
- a UUID stripped of colons and dashes
-
-