class UniqueValue
extends java.lang.Object
This is a package private class.
Modifier and Type | Field and Description |
---|---|
private static java.util.concurrent.atomic.AtomicInteger |
id
A global unique number, to ensure uniqueness of generated strings.
|
Constructor and Description |
---|
UniqueValue() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getUniqueBoundaryValue()
Get a unique value for use in a multipart boundary string.
|
static java.lang.String |
getUniqueMessageIDValue(Session ssn)
Get a unique value for use in a Message-ID.
|
private static java.util.concurrent.atomic.AtomicInteger id
public static java.lang.String getUniqueBoundaryValue()
hashCode()
,
and the current time (in milliseconds).public static java.lang.String getUniqueMessageIDValue(Session ssn)
hashCode()
, a global ID
(incremented on every use), the current time (in milliseconds),
and the host name from this user's local address generated by
InternetAddress.getLocalAddress()
.
(The host name defaults to "localhost" if
getLocalAddress()
returns null.)ssn
- Session object used to get the local addressInternetAddress