org.apache.activemq.util
Class IdGenerator

java.lang.Object
  extended by org.apache.activemq.util.IdGenerator

public class IdGenerator
extends java.lang.Object

Generator for Globally unique Strings.


Constructor Summary
IdGenerator()
           
IdGenerator(java.lang.String prefix)
          Construct an IdGenerator
 
Method Summary
 java.lang.String generateId()
          Generate a unqiue id
 java.lang.String generateSanitizedId()
          Generate a unique ID - that is friendly for a URL or file system
static java.lang.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

IdGenerator

public IdGenerator(java.lang.String prefix)
Construct an IdGenerator


IdGenerator

public IdGenerator()
Method Detail

getHostName

public static java.lang.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 java.lang.String generateId()
Generate a unqiue id

Returns:
a unique id

generateSanitizedId

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

Returns:
a unique id


Copyright © 2009 Apache Software Foundation. All Rights Reserved.