static enum Starttls.Protocol extends Enum<Starttls.Protocol>
Modifier and Type | Field and Description |
---|---|
(package private) int |
port
The standard port for a protocol
|
Modifier and Type | Method and Description |
---|---|
static Starttls.Protocol |
getByPort(int port)
Guess a protocol with given port number
|
static Starttls.Protocol |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Starttls.Protocol[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Starttls.Protocol SMTP
public static final Starttls.Protocol POP3
public static final Starttls.Protocol IMAP
public static final Starttls.Protocol LDAP
public static Starttls.Protocol[] values()
for (Starttls.Protocol c : Starttls.Protocol.values()) System.out.println(c);
public static Starttls.Protocol valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic static Starttls.Protocol getByPort(int port)
port
- the port number to tryStarttls.Protocol
enumeration constant, or null
if no appropriate protocol found