public enum SMTPServerHandler extends Enum<SMTPServerHandler>
| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
MailSaver |
getMailSaver()
Returns the
MailSaver object. |
org.subethamail.smtp.server.SMTPServer |
getSmtpServer()
Returns the
SMTPServer object. |
void |
startServer(int port,
InetAddress bindAddress)
Starts the server on the port and address specified in parameters.
|
void |
stopServer()
Stops the server.
|
static SMTPServerHandler |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SMTPServerHandler[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SMTPServerHandler INSTANCE
public static SMTPServerHandler[] values()
for (SMTPServerHandler c : SMTPServerHandler.values()) System.out.println(c);
public static SMTPServerHandler 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 startServer(int port,
InetAddress bindAddress)
throws BindPortException,
OutOfRangePortException
port - the SMTP port to be opened.bindAddress - the address to bind to. null means bind to all.BindPortException - when the port can't be opened.OutOfRangePortException - when port is out of range.IllegalArgumentException - when port is out of range.public void stopServer()
If the server is not started, does nothing special.
public MailSaver getMailSaver()
MailSaver object.MailSaver object.public org.subethamail.smtp.server.SMTPServer getSmtpServer()
SMTPServer object.SMTPServer object.Copyright © 2015. All rights reserved.