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)UuidGeneratoroptimized 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 StringgenerateSanitizedId()Generate a unique ID - that is friendly for a URL or file systemstatic StringgenerateSanitizedId(String id)Ensures that the id is friendly for a URL or file systemStringgenerateUuid()static StringgetHostName()As we have to find the hostname as a side-affect of generating a unique stub, we allow it's easy retrieval herestatic StringsanitizeHostName(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:
generateUuidin 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
-
-