Source code: org/mule/util/UUID.java
1 /*
2 * $Header: /cvsroot/mule/mule/src/java/org/mule/util/UUID.java,v 1.4 2003/10/20 21:44:38 rossmason Exp $
3 * $Revision: 1.4 $
4 * $Date: 2003/10/20 21:44:38 $
5 * ------------------------------------------------------------------------------------------------------
6 *
7 * Copyright (c) Cubis Limited. All rights reserved.
8 * http://www.cubis.co.uk
9 *
10 * The software in this package is published under the terms of the BSD
11 * style license a copy of which has been included with this distribution in
12 * the LICENSE.txt file.
13 *
14 */
15 package org.mule.util;
16
17 import java.io.Serializable;
18
19 import org.doomdark.uuid.UUIDGenerator;
20
21 /**
22 * <p><code>UUID</code> Generates a UUID using the doom dark JUG library
23 *
24 * @author <a href="mailto:ross.mason@cubis.co.uk">Ross Mason</a>
25 * @version $Revision: 1.4 $
26 */
27
28 public class UUID implements Serializable
29 {
30 String uuid = null;
31
32 public UUID()
33 {
34 UUIDGenerator gen = UUIDGenerator.getInstance();
35 uuid = gen.generateTimeBasedUUID().toString();
36 }
37
38 public String getUUID()
39 {
40 return uuid;
41 }
42 }