org.deegree_impl.tools
Class IDGenerator

java.lang.Object
  extended byorg.deegree_impl.tools.IDGenerator

public class IDGenerator
extends java.lang.Object

Produces unique IDs (used to generate Request-IDs, for example).

Version:
$Revision: 1.3 $ $Date: 2004/03/12 15:56:49 $
Author:
Markus Schneider

Field Summary
private  long id
          The current ID.
private static IDGenerator instance
          The only instance of this class.
 
Constructor Summary
IDGenerator()
           
 
Method Summary
 long generateUniqueID()
          Generates a completly unique ID.
static IDGenerator getInstance()
          Returns the only instance of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

private static IDGenerator instance
The only instance of this class.


id

private long id
The current ID.

Constructor Detail

IDGenerator

public IDGenerator()
Method Detail

getInstance

public static IDGenerator getInstance()
Returns the only instance of this class.

Returns:
the only instance of IDGenerator

generateUniqueID

public long generateUniqueID()
Generates a completly unique ID.

Returns:
a unique ID