class UniqueValue
extends java.lang.Object
This is a package private class.
| Modifier and Type | Field and Description |
|---|---|
private static int |
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.
|
private static int |
getUniqueId()
Ensure ID is unique by synchronizing access.
|
static java.lang.String |
getUniqueMessageIDValue(Session ssn)
Get a unique value for use in a Message-ID.
|
private static int 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), the string "JavaMail", and
this user's local address generated by
InternetAddress.getLocalAddress().
(The address defaults to "javamailuser@localhost" if
getLocalAddress() returns null.)ssn - Session object used to get the local addressInternetAddressprivate static int getUniqueId()