|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectejel.EmailAccount
public class EmailAccount
Represents an email account to be used to send emails via an SMTP Server
| Nested Class Summary | |
|---|---|
static class |
EmailAccount.ServerProtocol
The server protocol used to connect and communicate with the server |
| Field Summary | |
|---|---|
static int |
EMAILS_PER_HOUR_NO_LIMIT
SMTP Server is always ready for sending new emails using this account |
static java.lang.String |
SMTP_REGEX
A regex expression to validate smtp servers addresses |
| Constructor Summary | |
|---|---|
EmailAccount(java.lang.String csvLine)
Constructs a new EmailAccount object |
|
EmailAccount(java.lang.String login,
java.lang.String pswd,
java.lang.String srvr,
int port,
boolean ssl,
boolean auth,
int emailsPerH,
boolean monoCon)
Constructs a new EmailAccount object |
|
EmailAccount(java.lang.String login,
java.lang.String pswd,
java.lang.String srvr,
int port,
boolean ssl,
EmailAccount.ServerProtocol protocol)
Constructs a new EmailAccount object. |
|
EmailAccount(java.lang.String login,
java.lang.String pswd,
java.lang.String srvr,
java.lang.String port,
java.lang.String ssl,
java.lang.String auth,
java.lang.String emailsPerH,
java.lang.String monoCon)
Constructs a new EmailAccount object |
|
| Method Summary | |
|---|---|
int |
getEmailsPerHour()
Get the number of emails to send per one hour |
java.lang.String |
getHost()
Gets the host of the server |
long |
getLastSendTimeMillis()
Get the last time (millis) when the last email was sent |
java.lang.String |
getLogin()
Get the user login of the email account |
java.lang.String |
getPassword()
Get the password of the email account |
int |
getPortNumber()
Get the default port number of the SMTP Server for the email account |
EmailAccount.ServerProtocol |
getServerProtocol()
Gets the identifier of the protocol used to connect to the server |
java.lang.String |
getSmtpServer()
Get the SMTP Server address for the email account |
boolean |
isBusy()
Gets true if the email account is busy i.e sending an email |
boolean |
isDisabled()
Gets true if the email account is disabled |
boolean |
isReadyForSendingNewEmail()
Gets true if the email account is ready to send an other email via the SMTP Server |
java.lang.Boolean |
needAuthentication()
Gets true if the SMTP Server needs user authentication |
java.lang.Boolean |
needSSL()
Returns true if the connection with SMTP Server is secured |
boolean |
setBusyStatus(boolean busy)
Sets on the busy status or off |
void |
setDisabled()
Set the email account status to disabled |
void |
setReadyForSendingNewEmail()
Sets the ready status of the email account. |
void |
updateLastSendTimeMillis()
Set last time (millis) when last email was sent. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String SMTP_REGEX
public static final int EMAILS_PER_HOUR_NO_LIMIT
| Constructor Detail |
|---|
public EmailAccount(java.lang.String login,
java.lang.String pswd,
java.lang.String srvr,
int port,
boolean ssl,
boolean auth,
int emailsPerH,
boolean monoCon)
throws java.lang.IllegalArgumentException
login - Email account loginpswd - Email account pswdsrvr - SMTP Server for the email accountport - Default port number for the SMTP Serverssl - Use secured connectionauth - SMTP Server needs user authenticationemailsPerH - Number of emails to send every hourmonoCon - The email accound supports only one connection at a time
java.lang.IllegalArgumentException
public EmailAccount(java.lang.String login,
java.lang.String pswd,
java.lang.String srvr,
java.lang.String port,
java.lang.String ssl,
java.lang.String auth,
java.lang.String emailsPerH,
java.lang.String monoCon)
login - Email account loginpswd - Email account pswdsrvr - SMTP Server for the email accountport - Default port number for the SMTP Serverssl - Use secured connectionauth - SMTP Server needs user authenticationemailsPerH - Number of emails to send every hourmonoCon - The email accound supports only one connection at a time
java.lang.IllegalArgumentException
public EmailAccount(java.lang.String csvLine)
throws java.lang.IllegalArgumentException
csvLine - A CSV line containing all parameters needed to construct a valid EmailAccount object.
Content must be composed like that :
[login;password;smtp_server;port_number;use_ssl;needs_authentication;emails_per_hour;mono_connection]
java.lang.IllegalArgumentException
public EmailAccount(java.lang.String login,
java.lang.String pswd,
java.lang.String srvr,
int port,
boolean ssl,
EmailAccount.ServerProtocol protocol)
login - Email account loginpswd - Email account pswdsrvr - SMTP Server for the email accountport - Default port number for the SMTP Serverssl - Use secured connectionprotocole - The protocole used to connect and communicate with th server| Method Detail |
|---|
public EmailAccount.ServerProtocol getServerProtocol()
public java.lang.String getHost()
public void updateLastSendTimeMillis()
public long getLastSendTimeMillis()
public int getEmailsPerHour()
public java.lang.String getLogin()
public java.lang.String getPassword()
public java.lang.String getSmtpServer()
public int getPortNumber()
public java.lang.Boolean needSSL()
public java.lang.Boolean needAuthentication()
public boolean isReadyForSendingNewEmail()
public void setReadyForSendingNewEmail()
public boolean isBusy()
public boolean setBusyStatus(boolean busy)
busy - Set to true to make the email account busy
public boolean isDisabled()
public void setDisabled()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||