org.apache.muse.util.uuid
Class RandomUuidFactory

java.lang.Object
  extended byorg.apache.muse.util.uuid.RandomUuidFactory
All Implemented Interfaces:
UuidFactory

public class RandomUuidFactory
extends java.lang.Object
implements UuidFactory

RandomUuidFactory is a UuidFactory that generates random UUIDs. This implementation uses the JDK's java.security.SecureRandom to generate sufficiently random values for the UUIDs.

This class is a singleton, so it must be constructed through the static getInstance() method.

Author:
Dan Jemiolo (danj)

Method Summary
 java.lang.String createUUID()
           
static RandomUuidFactory getInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createUUID

public java.lang.String createUUID()
Specified by:
createUUID in interface UuidFactory
Returns:
A unique UUID of the form uuid:X, where X is the generated value.

getInstance

public static RandomUuidFactory getInstance()
Returns:
The singleton instance of this class.