All Packages This Package Class Hierarchy Class Search Index
Class grendel.util.MessageIDGenerator
java.lang.Object | +----grendel.util.MessageIDGenerator
This class generates globally-unique message IDs. These IDs conform to RFC 822, RFC 1036, and the so-called son-of-1036 draft.
public class MessageIDGenerator extends java.lang.Object { // Constructors 1 private MessageIDGenerator(); // Methods 2 private static void checkHostName(String); public static String generate(String); }
Constructors
MessageIDGenerator
private MessageIDGenerator()
Methods
generate
public static String generate(String host_name)
Generates a new Message-ID string.
Parameter Description hostname The `domain' part of the ID to generate. Generally, this should be the fully-qualified name of the local host. In situations where that is impossible to determine, or where the local host name might be considered confidential information, the host part of the return address of the authoring user will do.
If the provided host name is not syntactically valid, an error is signalled.
The host name may be null; in that case, a random sequence of characters will be used for the host name, resulting in a syntactically valid Message-ID. Note, however, that this is strongly discouraged by the relevant RFCs: Message-IDs should have valid host names in them if at all possible.
- Returns:
- The new ID, a String.
checkHostName
private static void checkHostName(String string)
All Packages This Package Class Hierarchy Class Search IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4