org.apache.muse.util.uuid
Class RandomUuidFactory

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

public class RandomUuidFactory
extends 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
 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 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.


Copyright © 2005-2011 Apache Web Services - Muse. All Rights Reserved.