org.fusesource.fabric.dosgi.util
Class UuidGenerator

java.lang.Object
  extended by org.fusesource.fabric.dosgi.util.UuidGenerator

public class UuidGenerator
extends java.lang.Object

A unique ID generator which is a fast implementation based on how

Method Summary
static java.lang.String generateSanitizedId(java.lang.String id)
          Ensures that the id 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
static UuidGenerator getInstance()
           
static java.lang.String getUUID()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

generateSanitizedId

public static java.lang.String generateSanitizedId(java.lang.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

getUUID

public static java.lang.String getUUID()

getInstance

public static UuidGenerator getInstance()


Copyright © 2013 Red Hat. All Rights Reserved.