Apache CXF API

org.apache.cxf.wsn.util
Class IdGenerator

java.lang.Object
  extended by org.apache.cxf.wsn.util.IdGenerator

public class IdGenerator
extends Object

Generator for Globally unique Strings.


Constructor Summary
IdGenerator()
           
IdGenerator(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

IdGenerator

public IdGenerator()

IdGenerator

public IdGenerator(String prefix)
Construct an IdGenerator

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

Apache CXF API

Apache CXF