Jwma

dtw.webmail.util
Class UIDGenerator

java.lang.Object
  |
  +--dtw.webmail.util.UIDGenerator

public class UIDGenerator
extends java.lang.Object

Utility class exposing a method that will return a unique identifier.

Version:
0.9.7 07/02/2003
Author:
Dieter Wimberger

Field Summary
static java.lang.String HOTBITS_URL
           
static int RANDOM_PADDING
           
static int RANDOM_RESEED
           
static int RANDOM_SEED_LENGTH
           
 
Constructor Summary
UIDGenerator()
           
 
Method Summary
static java.lang.String getUID()
          Returns a UID (unique identifier) as String.
static void main(java.lang.String[] args)
           
static void seedRandom()
          If the HotBits Server is available, Random will be seeded with a real random long.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RANDOM_PADDING

public static final int RANDOM_PADDING
See Also:
Constant Field Values

RANDOM_SEED_LENGTH

public static final int RANDOM_SEED_LENGTH
See Also:
Constant Field Values

RANDOM_RESEED

public static final int RANDOM_RESEED
See Also:
Constant Field Values

HOTBITS_URL

public static final java.lang.String HOTBITS_URL
See Also:
Constant Field Values
Constructor Detail

UIDGenerator

public UIDGenerator()
Method Detail

getUID

public static final java.lang.String getUID()
Returns a UID (unique identifier) as String. The identifier represents the MD5 hashed combination of a java.rmi.server.UID instance, a random padding of RANDOM_PADDING length, it's identity hashcode and System.currentTimeMillis().

Returns:
the UID as String.

seedRandom

public static final void seedRandom()
If the HotBits Server is available, Random will be seeded with a real random long.

HotBits is located at Fermilab, Switzerland.


main

public static final void main(java.lang.String[] args)

Jwma

Copyright © 2000-2003 jwma team (All Rights Reserved.)