org.apache.camel.impl
Class ActiveMQUuidGenerator

java.lang.Object
  extended by org.apache.camel.impl.ActiveMQUuidGenerator
All Implemented Interfaces:
UuidGenerator

public class ActiveMQUuidGenerator
extends Object
implements UuidGenerator

UuidGenerator which is a fast implementation based on how PROPERTY_IDGENERATOR_PORT can be used to set a specific port number to be used as part of the initialization process to generate unique UUID.


Field Summary
static String PROPERTY_IDGENERATOR_PORT
           
 
Constructor Summary
ActiveMQUuidGenerator()
           
ActiveMQUuidGenerator(String prefix)
           
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_IDGENERATOR_PORT

public static final String PROPERTY_IDGENERATOR_PORT
See Also:
Constant Field Values
Constructor Detail

ActiveMQUuidGenerator

public ActiveMQUuidGenerator(String prefix)

ActiveMQUuidGenerator

public ActiveMQUuidGenerator()
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

sanitizeHostName

public static String sanitizeHostName(String hostName)

generateUuid

public String generateUuid()
Description copied from interface: UuidGenerator
Generates a UUID string representation.

Specified by:
generateUuid in interface UuidGenerator
Returns:
the unique id.

generateSanitizedId

public String generateSanitizedId()
Generate a unique ID - that is friendly for a URL or file system

Returns:
a unique id

generateSanitizedId

public static String generateSanitizedId(String id)
Ensures that the id is friendly for a URL or file system

Parameters:
id - the unique id
Returns:
the id as file friendly id


Apache Camel