org.apache.camel.util
Class UIdGenerator

java.lang.Object
  extended by org.apache.camel.util.UIdGenerator

public class UIdGenerator
extends Object

Generator for Globally unique Strings.


Constructor Summary
UIdGenerator()
           
UIdGenerator(String prefix)
          Construct an IdGenerator
 
Method Summary
 String generateId()
          Generate a unqiue id
 String generateSanitizedId()
          Generate a unique ID - that is friendly for a URL or file system
static String getHostName()
          As we have to find the hostname as a side-affect of generating a unique stub, we allow it's easy retrevial here
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UIdGenerator

public UIdGenerator(String prefix)
Construct an IdGenerator


UIdGenerator

public UIdGenerator()
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 retrevial here

Returns:
the local host name

generateId

public String generateId()
Generate a unqiue id

Returns:
a unique id

generateSanitizedId

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

Returns:
a unique id


Copyright © 2007 Apache Software Foundation. All Rights Reserved.