Enum Class UIModel

java.lang.Object
java.lang.Enum<UIModel>
com.nilhcem.fakesmtp.model.UIModel
All Implemented Interfaces:
Serializable, Comparable<UIModel>, java.lang.constant.Constable

public enum UIModel extends Enum<UIModel>
UI presentation model of the application.

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.

Since:
1.0
Author:
Nilhcem
See Also:
  • Enum Constant Details

    • INSTANCE

      public static final UIModel INSTANCE
  • Method Details

    • values

      public static UIModel[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static UIModel valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toggleButton

      Happens when a user clicks on the start button.

      This method will notify the SMTPServerHandler to start the server.

      Throws:
      InvalidPortException - when the port is invalid.
      BindPortException - when the port cannot be bound.
      OutOfRangePortException - when the port is out of range.
      InvalidHostException - when the address cannot be resolved.
      RuntimeException - when an unknown exception happened.
    • isStarted

      public boolean isStarted()
      Returns true if the server is started.
      Returns:
      true if the server is started.
    • setPort

      public void setPort(String port)
    • setHost

      public void setHost(String host)
    • getNbMessageReceived

      public int getNbMessageReceived()
    • setNbMessageReceived

      public void setNbMessageReceived(int nbMessageReceived)
    • getSavePath

      public String getSavePath()
    • setSavePath

      public void setSavePath(String savePath)
    • getListMailsMap

      public Map<Integer,String> getListMailsMap()
    • getRelayDomains

      public List<String> getRelayDomains()
    • setRelayDomains

      public void setRelayDomains(List<String> relayDomains)