public enum ProtocolState extends Enum<ProtocolState>
| Enum Constant and Description |
|---|
DATA
After receiving DATA.
|
HELO
After receiving HELO.
|
INIT
Before any contact with the client.
|
MAIL
After receiving MAIL FROM.
|
QUIT
After receiving QUIT.
|
RCPT
After receiving RCPT TO.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canExecute(String command_name)
Check if it can execute this command given the state.
|
ProtocolState |
changeState(String command)
return the next state given the command.
|
static ProtocolState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ProtocolState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ProtocolState INIT
public static final ProtocolState HELO
public static final ProtocolState MAIL
public static final ProtocolState RCPT
public static final ProtocolState DATA
public static final ProtocolState QUIT
public static ProtocolState[] values()
for (ProtocolState c : ProtocolState.values()) System.out.println(c);
public static ProtocolState 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 boolean canExecute(String command_name)
command_name - to executepublic ProtocolState changeState(String command)
command - which is executedCopyright © 2019. All rights reserved.