All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----com.ibm.beans.netdeploy.ID
public static final String INVALID_ID_VALUE
public static final int nValueBytes
public static final int nValueDigits
public ID()
New ID instances should normally be acquired from a factory method, and not instantiated directly. The reason for this is that, in order to avoid ID collisions, the value must either be dispensed one-after-another from a single distribution point, or chosen randomly from a large space using a secure random number source.
Therefore, if the IDs are being dispensed from a centralized source, the factory method of that source should be called. If they are being randomly chosen, the value should be set from a good random number source, such as a hardware generator, or the java.security.SecureRandom class. In the hardware case, a factory method will be obviously be needed, in order to make native calls to the hardware random number generator.
Lastly, in the case of java.security.SecureRandom, this class typically takes several minutes to initialize. For performance reasons, a single instance should be kept, within a factory method on a relatively permanent object.
If an ID instance must be constructed directly, be sure to immediately set the value, using setValue().
public ID(String valueString)
public void setValue(byte valueBytes[])
This method should only be called during deserialization, or from factory methods.
public String toString()
public boolean equals(Object obj)
public int hashCode()
All Packages Class Hierarchy This Package Previous Next Index