public class MailServer
extends java.lang.Object
implements java.lang.AutoCloseable
| Constructor and Description |
|---|
MailServer(ServerConfiguration serverConfiguration)
Instantiates a new mail server.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
java.util.List<EmailModel> |
getMails()
Gets the mails of the server.
|
java.util.List<EmailModel> |
getRejectedMails()
Gets the rejected mails from the server.
|
java.util.List<java.lang.String> |
getRelayDomains()
Gets the relay domains.
|
boolean |
isRunning()
Checks if the mail server is running.
|
void |
start()
Start.
|
public MailServer(ServerConfiguration serverConfiguration)
serverConfiguration - the server configurationpublic void close()
throws java.lang.Exception
close in interface java.lang.AutoCloseablejava.lang.Exceptionpublic java.util.List<EmailModel> getMails()
public java.util.List<EmailModel> getRejectedMails()
public java.util.List<java.lang.String> getRelayDomains()
public boolean isRunning()
public void start()
throws BindPortException,
OutOfRangePortException,
InvalidPortException,
InvalidHostException
BindPortException - the bind port exceptionOutOfRangePortException - the out of range port exceptionInvalidPortException - the invalid port exceptionInvalidHostException - the invalid host exception