NameBasedGenerator Class

Definition

Implementation of UUID generator that uses one of name-based generation methods (variants 3 (MD5) and 5 (SHA1)).

As all JUG provided implementations, this generator is fully thread-safe; access to digester is synchronized as necessary.

public class NameBasedGenerator extends StringArgGenerator
Inheritance
java.lang.Object
NameBasedGenerator

Inherited Members

StringArgGenerator.generate(byte[] nameBytes) StringArgGenerator.generate(String name) UUIDGenerator.getType() java.lang.Object.clone() java.lang.Object.equals(java.lang.Object) java.lang.Object.finalize() java.lang.Object.getClass() java.lang.Object.hashCode() java.lang.Object.notify() java.lang.Object.notifyAll() java.lang.Object.toString() java.lang.Object.wait() java.lang.Object.wait(long) java.lang.Object.wait(long,int)

Constructors

NameBasedGenerator(UUID namespace, MessageDigest digester, UUIDType type)

Fields

NAMESPACE_DNS

Namespace used when name is a DNS name.

NAMESPACE_OID

Namespace used when name is an OID.

NAMESPACE_URL

Namespace used when name is a URL.

NAMESPACE_X500

Namespace used when name is an X500 identifier

_digester

Message digesster to use for hash calculation

_namespace

Namespace to use as prefix.

_type
_utf8

Methods

generate(byte[] nameBytes)

Method for generating name-based UUIDs using specified byte-serialization of name.

generate(String name)

Method for generating name-based UUIDs using specified name (serialized to bytes using UTF-8 encoding)

getNamespace()
getType()

Accessor for determining type of UUIDs (variant) that this generator instance will produce.

Applies to