Package org.apache.cxf.wsn.util
Class IdGenerator
- java.lang.Object
-
- org.apache.cxf.wsn.util.IdGenerator
-
public class IdGenerator extends Object
Generator for Globally unique Strings.
-
-
Constructor Summary
Constructors Constructor Description IdGenerator()IdGenerator(String prefix)Construct an IdGenerator
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgenerateId()Generate a unqiue idStringgenerateSanitizedId()Generate a unique ID - that is friendly for a URL or file systemstatic StringgetHostName()As we have to find the hostname as a side-affect of generating a unique stub, we allow it's easy retrevial here
-
-
-
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
-
-