Package org.apache.camel.support
Class ClassicUuidGenerator
- java.lang.Object
-
- org.apache.camel.support.ClassicUuidGenerator
-
- All Implemented Interfaces:
org.apache.camel.spi.UuidGenerator
public class ClassicUuidGenerator extends Object implements org.apache.camel.spi.UuidGenerator
The classic (Camel 2.x)UuidGenerator
optimized for Camel usage.
-
-
Constructor Summary
Constructors Constructor Description ClassicUuidGenerator()
ClassicUuidGenerator(String prefix)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
generateSanitizedId()
Generate a unique ID - that is friendly for a URL or file systemstatic String
generateSanitizedId(String id)
Ensures that the id is friendly for a URL or file systemString
generateUuid()
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 herestatic String
sanitizeHostName(String hostName)
-
-
-
Constructor Detail
-
ClassicUuidGenerator
public ClassicUuidGenerator(String prefix)
-
ClassicUuidGenerator
public ClassicUuidGenerator()
-
-
Method Detail
-
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 retrieval here- Returns:
- the local host name
-
generateUuid
public String generateUuid()
- Specified by:
generateUuid
in interfaceorg.apache.camel.spi.UuidGenerator
-
generateSanitizedId
public String generateSanitizedId()
Generate a unique ID - that is friendly for a URL or file system- Returns:
- a unique id
-
-