public enum UIModel extends Enum<UIModel>
The essence of a Presentation Model is of a fully self-contained class that represents all the data and behavior of the UI window, but without any of the controls used to render that UI on the screen.
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
Map<Integer,String> |
getListMailsMap() |
int |
getNbMessageReceived() |
List<String> |
getRelayDomains() |
String |
getSavePath() |
boolean |
isStarted()
Returns
true if the server is started. |
void |
setNbMessageReceived(int nbMessageReceived) |
void |
setPort(String port) |
void |
setRelayDomains(List<String> relayDomains) |
void |
setSavePath(String savePath) |
void |
toggleButton()
Happens when a user clicks on the start button.
|
static UIModel |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static UIModel[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final UIModel INSTANCE
public static UIModel[] values()
for (UIModel c : UIModel.values()) System.out.println(c);
public static UIModel 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 void toggleButton() throws BindPortException, OutOfRangePortException, InvalidPortException
This method will notify the SMTPServerHandler
to start the server.
InvalidPortException
- when the port is invalid.BindPortException
- when the port cannot be bound.OutOfRangePortException
- when the port is out of range.RuntimeException
- when an unknown exception happened.public boolean isStarted()
true
if the server is started.true
if the server is started.public void setPort(String port)
public int getNbMessageReceived()
public void setNbMessageReceived(int nbMessageReceived)
public String getSavePath()
public void setSavePath(String savePath)
Copyright © 2015. All rights reserved.