站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.6 API 英文版文档

UUIDGenerator - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.common.util
Class UUIDGenerator

java.lang.Object
  extended byorg.jboss.portal.common.util.UUIDGenerator

public class UUIDGenerator
extends java.lang.Object

Adapted from ejb plugin key generated. The implementation of UUID key generator based on the algorithm from Floyd Marinescu's EJB Design Patterns.

Version:
$Revision: 5451 $
Author:
Alex Loubyansky, Julien Viet

Field Summary
private static char[] hexDigits
          Hex digits
private  java.lang.String midValue
          cached middle value
private  java.security.SecureRandom seeder
          secure random to provide nonrepeating seed
 
Constructor Summary
UUIDGenerator()
           
 
Method Summary
 java.lang.String generateKey()
           
private  java.lang.String toHex(int value, int length)
          Converts int value to string hex representation
private static int toInt(byte[] bytes)
          Constructs int value from byte array
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hexDigits

private static final char[] hexDigits
Hex digits


seeder

private java.security.SecureRandom seeder
secure random to provide nonrepeating seed


midValue

private java.lang.String midValue
cached middle value

Constructor Detail

UUIDGenerator

public UUIDGenerator()
Method Detail

generateKey

public java.lang.String generateKey()

toHex

private java.lang.String toHex(int value,
                               int length)
Converts int value to string hex representation


toInt

private static int toInt(byte[] bytes)
Constructs int value from byte array