Package org.apache.camel.support
Class ClassicUuidGenerator
java.lang.Object
org.apache.camel.support.ClassicUuidGenerator
- All Implemented Interfaces:
org.apache.camel.spi.UuidGenerator
The classic (Camel 2.x)
UuidGenerator
optimized for Camel usage.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGenerate a unique ID - that is friendly for a URL or file systemstatic String
Ensures that the id is friendly for a URL or file systemstatic String
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) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.camel.spi.UuidGenerator
generateExchangeUuid
-
Constructor Details
-
ClassicUuidGenerator
-
ClassicUuidGenerator
public ClassicUuidGenerator()
-
-
Method Details
-
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
-
sanitizeHostName
-
generateUuid
- Specified by:
generateUuid
in interfaceorg.apache.camel.spi.UuidGenerator
-
generateSanitizedId
Generate a unique ID - that is friendly for a URL or file system- Returns:
- a unique id
-
generateSanitizedId
Ensures that the id is friendly for a URL or file system- Parameters:
id
- the unique id- Returns:
- the id as file friendly id
-