public class DefaultUuidGenerator extends Object implements UuidGenerator
UuidGenerator
that is based on the ActiveMQUuidGenerator
but
is optimized for Camel usage to startup faster and avoid use local network binding to obtain a random number.Constructor and Description |
---|
DefaultUuidGenerator() |
DefaultUuidGenerator(String prefix) |
Modifier and Type | Method and Description |
---|---|
String |
generateSanitizedId()
Generate a unique ID - that is friendly for a URL or file system
|
static String |
generateSanitizedId(String id)
Ensures that the id is friendly for a URL or file system
|
String |
generateUuid()
Generates a UUID string representation.
|
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
|
static String |
sanitizeHostName(String hostName) |
public DefaultUuidGenerator(String prefix)
public DefaultUuidGenerator()
public static String getHostName()
public static String sanitizeHostName(String hostName)
public String generateUuid()
UuidGenerator
generateUuid
in interface UuidGenerator
public String generateSanitizedId()
public static String generateSanitizedId(String id)
id
- the unique idApache Camel